Changeset 609243f4 in mainline for uspace/srv/net/il/ip/ip.c
- Timestamp:
- 2011-10-07T15:46:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2c50e1
- Parents:
- f51b1d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.c
rf51b1d3 r609243f4 482 482 } 483 483 484 static int ip_device_req_local( device_id_t device_id, services_t netif)484 static int ip_device_req_local(nic_device_id_t device_id, services_t netif) 485 485 { 486 486 ip_netif_t *ip_netif; … … 501 501 ip_netif->device_id = device_id; 502 502 ip_netif->service = netif; 503 ip_netif->state = N ETIF_STOPPED;503 ip_netif->state = NIC_STATE_STOPPED; 504 504 505 505 fibril_rwlock_write_lock(&ip_globals.netifs_lock); … … 594 594 while (index >= 0) { 595 595 netif = ip_netifs_get_index(&ip_globals.netifs, index); 596 if (netif && (netif->state == N ETIF_ACTIVE)) {596 if (netif && (netif->state == NIC_STATE_ACTIVE)) { 597 597 route = ip_netif_find_route(netif, destination); 598 598 if (route) … … 1142 1142 } 1143 1143 1144 static int ip_send_msg_local( device_id_t device_id, packet_t *packet,1144 static int ip_send_msg_local(nic_device_id_t device_id, packet_t *packet, 1145 1145 services_t sender, services_t error) 1146 1146 { … … 1258 1258 * @return ENOENT if device is not found. 1259 1259 */ 1260 static int ip_device_state_message(device_id_t device_id, device_state_t state) 1260 static int ip_device_state_message(nic_device_id_t device_id, 1261 nic_device_state_t state) 1261 1262 { 1262 1263 ip_netif_t *netif; … … 1272 1273 fibril_rwlock_write_unlock(&ip_globals.netifs_lock); 1273 1274 1274 printf("%s: Device %d changed state to %d\n", NAME, device_id, state); 1275 printf("%s: Device %d changed state to '%s'\n", NAME, device_id, 1276 nic_device_state_to_string(state)); 1275 1277 1276 1278 return EOK; … … 1312 1314 * tl_received_msg() function. 1313 1315 */ 1314 static int ip_deliver_local( device_id_t device_id, packet_t *packet,1316 static int ip_deliver_local(nic_device_id_t device_id, packet_t *packet, 1315 1317 ip_header_t *header, services_t error) 1316 1318 { … … 1413 1415 * is disabled. 1414 1416 */ 1415 static int ip_process_packet( device_id_t device_id, packet_t *packet)1417 static int ip_process_packet(nic_device_id_t device_id, packet_t *packet) 1416 1418 { 1417 1419 ip_header_t *header; … … 1514 1516 * 1515 1517 */ 1516 static int ip_packet_size_message( device_id_t device_id, size_t *addr_len,1518 static int ip_packet_size_message(nic_device_id_t device_id, size_t *addr_len, 1517 1519 size_t *prefix, size_t *content, size_t *suffix) 1518 1520 { … … 1572 1574 * @return ENOENT if device is not found. 1573 1575 */ 1574 static int ip_mtu_changed_message( device_id_t device_id, size_t mtu)1576 static int ip_mtu_changed_message(nic_device_id_t device_id, size_t mtu) 1575 1577 { 1576 1578 ip_netif_t *netif; … … 1629 1631 async_answer_0(iid, (sysarg_t) rc); 1630 1632 break; 1631 1633 case NET_IL_ADDR_CHANGED: 1634 async_answer_0(iid, (sysarg_t) EOK); 1635 break; 1636 1632 1637 default: 1633 1638 async_answer_0(iid, (sysarg_t) ENOTSUP); … … 1689 1694 } 1690 1695 1691 static int ip_add_route_req_local( device_id_t device_id, in_addr_t address,1696 static int ip_add_route_req_local(nic_device_id_t device_id, in_addr_t address, 1692 1697 in_addr_t netmask, in_addr_t gateway) 1693 1698 { … … 1723 1728 } 1724 1729 1725 static int ip_set_gateway_req_local(device_id_t device_id, in_addr_t gateway) 1730 static int ip_set_gateway_req_local(nic_device_id_t device_id, 1731 in_addr_t gateway) 1726 1732 { 1727 1733 ip_netif_t *netif; … … 1757 1763 * 1758 1764 */ 1759 static int ip_received_error_msg_local( device_id_t device_id,1765 static int ip_received_error_msg_local(nic_device_id_t device_id, 1760 1766 packet_t *packet, services_t target, services_t error) 1761 1767 { … … 1818 1824 static int ip_get_route_req_local(ip_protocol_t protocol, 1819 1825 const struct sockaddr *destination, socklen_t addrlen, 1820 device_id_t *device_id, void **header, size_t *headerlen)1826 nic_device_id_t *device_id, void **header, size_t *headerlen) 1821 1827 { 1822 1828 struct sockaddr_in *address_in; … … 1909 1915 size_t suffix; 1910 1916 size_t content; 1911 device_id_t device_id;1917 nic_device_id_t device_id; 1912 1918 int rc; 1913 1919
Note:
See TracChangeset
for help on using the changeset viewer.