Changeset 4e5c7ba in mainline for uspace/srv/net/il/ip/ip.c
- Timestamp:
- 2010-11-18T22:36:12Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f772bc55
- Parents:
- cb569e6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.c
rcb569e6 r4e5c7ba 144 144 static int ip_get_icmp_phone(void) 145 145 { 146 ip_proto_ refproto;146 ip_proto_t *proto; 147 147 int phone; 148 148 … … 308 308 * nil_packet_size_req() function. 309 309 */ 310 static int ip_netif_initialize(ip_netif_ refip_netif)310 static int ip_netif_initialize(ip_netif_t *ip_netif) 311 311 { 312 312 measured_string_t names[] = { … … 348 348 char *data; 349 349 measured_string_t address; 350 ip_route_ refroute;350 ip_route_t *route; 351 351 in_addr_t gateway; 352 352 int index; … … 378 378 return ENOTSUP; 379 379 } else if (ip_netif->ipv == IPV4) { 380 route = (ip_route_ ref) malloc(sizeof(ip_route_t));380 route = (ip_route_t *) malloc(sizeof(ip_route_t)); 381 381 if (!route) { 382 382 net_free_settings(configuration, data); … … 491 491 static int ip_mtu_changed_message(device_id_t device_id, size_t mtu) 492 492 { 493 ip_netif_ refnetif;493 ip_netif_t *netif; 494 494 495 495 fibril_rwlock_write_lock(&ip_globals.netifs_lock); … … 516 516 static int ip_device_state_message(device_id_t device_id, device_state_t state) 517 517 { 518 ip_netif_ refnetif;518 ip_netif_t *netif; 519 519 520 520 fibril_rwlock_write_lock(&ip_globals.netifs_lock); … … 993 993 */ 994 994 static int 995 ip_send_route(packet_t packet, ip_netif_ ref netif, ip_route_refroute,995 ip_send_route(packet_t packet, ip_netif_t *netif, ip_route_t *route, 996 996 in_addr_t *src, in_addr_t dest, services_t error) 997 997 { … … 1065 1065 * @returns NULL if no route was found. 1066 1066 */ 1067 static ip_route_ ref1068 ip_netif_find_route(ip_netif_refnetif, in_addr_t destination)1067 static ip_route_t 1068 *ip_netif_find_route(ip_netif_t *netif, in_addr_t destination) 1069 1069 { 1070 1070 int index; 1071 ip_route_ refroute;1071 ip_route_t *route; 1072 1072 1073 1073 if (!netif) … … 1093 1093 * @returns NULL if no route was found. 1094 1094 */ 1095 static ip_route_ refip_find_route(in_addr_t destination) {1095 static ip_route_t *ip_find_route(in_addr_t destination) { 1096 1096 int index; 1097 ip_route_ refroute;1098 ip_netif_ refnetif;1097 ip_route_t *route; 1098 ip_netif_t *netif; 1099 1099 1100 1100 // start with the last netif - the newest one … … 1119 1119 * @returns NULL if no IP address was found. 1120 1120 */ 1121 static in_addr_t *ip_netif_address(ip_netif_ refnetif)1122 { 1123 ip_route_ refroute;1121 static in_addr_t *ip_netif_address(ip_netif_t *netif) 1122 { 1123 ip_route_t *route; 1124 1124 1125 1125 route = ip_routes_get_index(&netif->routes, 0); … … 1147 1147 tl_received_msg_t received_msg) 1148 1148 { 1149 ip_proto_ refproto;1149 ip_proto_t *proto; 1150 1150 int index; 1151 1151 … … 1153 1153 return EINVAL; 1154 1154 1155 proto = (ip_proto_ ref) malloc(sizeof(ip_protos_t));1155 proto = (ip_proto_t *) malloc(sizeof(ip_protos_t)); 1156 1156 if (!proto) 1157 1157 return ENOMEM; … … 1180 1180 ip_device_req_local(int il_phone, device_id_t device_id, services_t netif) 1181 1181 { 1182 ip_netif_ refip_netif;1183 ip_route_ refroute;1182 ip_netif_t *ip_netif; 1183 ip_route_t *route; 1184 1184 int index; 1185 1185 int rc; 1186 1186 1187 ip_netif = (ip_netif_ ref) malloc(sizeof(ip_netif_t));1187 ip_netif = (ip_netif_t *) malloc(sizeof(ip_netif_t)); 1188 1188 if (!ip_netif) 1189 1189 return ENOMEM; … … 1251 1251 { 1252 1252 int addrlen; 1253 ip_netif_ refnetif;1254 ip_route_ refroute;1253 ip_netif_t *netif; 1254 ip_route_t *route; 1255 1255 struct sockaddr *addr; 1256 1256 struct sockaddr_in *address_in; … … 1367 1367 size_t *content, size_t *suffix) 1368 1368 { 1369 ip_netif_ refnetif;1369 ip_netif_t *netif; 1370 1370 int index; 1371 1371 … … 1454 1454 services_t error) 1455 1455 { 1456 ip_proto_ refproto;1456 ip_proto_t *proto; 1457 1457 int phone; 1458 1458 services_t service; … … 1557 1557 ip_header_ref header; 1558 1558 in_addr_t dest; 1559 ip_route_ refroute;1559 ip_route_t *route; 1560 1560 int phone; 1561 1561 struct sockaddr *addr; … … 1647 1647 in_addr_t netmask, in_addr_t gateway) 1648 1648 { 1649 ip_route_ refroute;1650 ip_netif_ refnetif;1649 ip_route_t *route; 1650 ip_netif_t *netif; 1651 1651 int index; 1652 1652 … … 1659 1659 } 1660 1660 1661 route = (ip_route_ ref) malloc(sizeof(ip_route_t));1661 route = (ip_route_t *) malloc(sizeof(ip_route_t)); 1662 1662 if (!route) { 1663 1663 fibril_rwlock_write_unlock(&ip_globals.netifs_lock); … … 1681 1681 ip_set_gateway_req_local(int ip_phone, device_id_t device_id, in_addr_t gateway) 1682 1682 { 1683 ip_netif_ refnetif;1683 ip_netif_t *netif; 1684 1684 1685 1685 fibril_rwlock_write_lock(&ip_globals.netifs_lock); … … 1721 1721 icmp_type_t type; 1722 1722 icmp_code_t code; 1723 ip_netif_ refnetif;1723 ip_netif_t *netif; 1724 1724 measured_string_t address; 1725 ip_route_ refroute;1725 ip_route_t *route; 1726 1726 ip_header_ref header; 1727 1727 … … 1782 1782 in_addr_t *dest; 1783 1783 in_addr_t *src; 1784 ip_route_ refroute;1784 ip_route_t *route; 1785 1785 ipv4_pseudo_header_ref header_in; 1786 1786
Note:
See TracChangeset
for help on using the changeset viewer.