Changeset f9d3dd4 in mainline
- Timestamp:
- 2012-02-27T21:16:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3d016ac
- Parents:
- 1cc8b42
- Location:
- uspace/srv/ethip
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ethip/Makefile
r1cc8b42 rf9d3dd4 32 32 SOURCES = \ 33 33 arp.c \ 34 atrans.c \ 34 35 ethip.c \ 35 36 ethip_nic.c \ -
uspace/srv/ethip/arp.c
r1cc8b42 rf9d3dd4 41 41 42 42 #include "arp.h" 43 #include "atrans.h" 43 44 #include "ethip.h" 44 45 #include "ethip_nic.h" … … 69 70 if (laddr != NULL) { 70 71 log_msg(LVL_DEBUG, "Request on my address"); 72 73 (void) atrans_add(&packet.sender_proto_addr, 74 &packet.sender_hw_addr); 71 75 72 76 reply.opcode = aop_reply; -
uspace/srv/ethip/ethip.c
r1cc8b42 rf9d3dd4 46 46 47 47 #include "arp.h" 48 #include "atrans.h" 48 49 #include "ethip.h" 49 50 #include "ethip_nic.h" … … 172 173 void *data; 173 174 size_t size; 175 mac48_addr_t dest_mac_addr; 174 176 int rc; 175 177 176 178 log_msg(LVL_DEBUG, "ethip_send()"); 177 179 178 frame.dest.addr = 0xdeeedeeedeee; 180 rc = atrans_lookup(&sdu->ldest, &dest_mac_addr); 181 if (rc != EOK) { 182 log_msg(LVL_WARN, "Failed to look up IP address 0x%" PRIx32, 183 sdu->ldest.ipv4); 184 return rc; 185 } 186 187 frame.dest = dest_mac_addr; 179 188 frame.src = nic->mac_addr; 180 189 frame.etype_len = ETYPE_IP; -
uspace/srv/ethip/ethip.h
r1cc8b42 rf9d3dd4 109 109 } arp_eth_packet_t; 110 110 111 /** Address translation table element */ 112 typedef struct { 113 link_t atrans_list; 114 iplink_srv_addr_t ip_addr; 115 mac48_addr_t mac_addr; 116 } ethip_atrans_t; 117 111 118 extern int ethip_iplink_init(ethip_nic_t *); 112 119 extern int ethip_received(iplink_srv_t *, void *, size_t);
Note:
See TracChangeset
for help on using the changeset viewer.