Changeset 02a09ed in mainline for uspace/srv/net/ethip
- Timestamp:
- 2013-06-28T20:20:03Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1d24ad3
- Parents:
- edf0d27
- Location:
- uspace/srv/net/ethip
- Files:
-
- 11 edited
-
arp.c (modified) (3 diffs)
-
arp.h (modified) (1 diff)
-
atrans.c (modified) (3 diffs)
-
atrans.h (modified) (1 diff)
-
ethip.c (modified) (7 diffs)
-
ethip.h (modified) (5 diffs)
-
ethip_nic.c (modified) (8 diffs)
-
ethip_nic.h (modified) (2 diffs)
-
pdu.c (modified) (6 diffs)
-
pdu.h (modified) (1 diff)
-
std.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/ethip/arp.c
redf0d27 r02a09ed 38 38 #include <io/log.h> 39 39 #include <inet/iplink_srv.h> 40 #include <inet/addr.h> 40 41 #include <stdlib.h> 41 42 #include <net/socket_codes.h> 42 43 #include "arp.h" 43 44 #include "atrans.h" … … 54 55 void arp_received(ethip_nic_t *nic, eth_frame_t *frame) 55 56 { 56 int rc; 57 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_received()"); 58 57 59 arp_eth_packet_t packet; 58 arp_eth_packet_t reply; 59 ethip_link_addr_t *laddr; 60 61 log_msg(LOG_DEFAULT, LVL_DEBUG, "arp_received()"); 62 63 rc = arp_pdu_decode(frame->data, frame->size, &packet); 60 int rc = arp_pdu_decode(frame->data, frame->size, &packet); 64 61 if (rc != EOK) 65 62 return; 66 63 67 64 log_msg(LOG_DEFAULT, LVL_DEBUG, "ARP PDU decoded, opcode=%d, tpa=%x", 68 65 packet.opcode, packet.target_proto_addr); 69 70 laddr = ethip_nic_addr_find(nic, packet.target_proto_addr); 71 if (laddr != NULL) { 72 log_msg(LOG_DEFAULT, LVL_DEBUG, "Request/reply to my address"); 73 74 (void) atrans_add(packet.sender_proto_addr, 75 &packet.sender_hw_addr); 76 77 if (packet.opcode == aop_request) { 78 reply.opcode = aop_reply; 79 reply.sender_hw_addr = nic->mac_addr; 80 reply.sender_proto_addr = laddr->addr; 81 reply.target_hw_addr = packet.sender_hw_addr; 82 reply.target_proto_addr = packet.sender_proto_addr; 83 84 arp_send_packet(nic, &reply); 85 } 66 67 inet_addr_t addr; 68 inet_addr_set(packet.target_proto_addr, &addr); 69 70 ethip_link_addr_t *laddr = ethip_nic_addr_find(nic, &addr); 71 if (laddr == NULL) 72 return; 73 74 addr32_t laddr_v4; 75 uint16_t laddr_af = inet_addr_get(&laddr->addr, &laddr_v4, NULL); 76 if (laddr_af != AF_INET) 77 return; 78 79 log_msg(LOG_DEFAULT, LVL_DEBUG, "Request/reply to my address"); 80 81 (void) atrans_add(packet.sender_proto_addr, 82 packet.sender_hw_addr); 83 84 if (packet.opcode == aop_request) { 85 arp_eth_packet_t reply; 86 87 reply.opcode = aop_reply; 88 addr48(nic->mac_addr, reply.sender_hw_addr); 89 reply.sender_proto_addr = laddr_v4; 90 addr48(packet.sender_hw_addr, reply.target_hw_addr); 91 reply.target_proto_addr = packet.sender_proto_addr; 92 93 arp_send_packet(nic, &reply); 86 94 } 87 95 } 88 96 89 int arp_translate(ethip_nic_t *nic, uint32_t src_addr, uint32_t ip_addr,90 mac48_addr_t *mac_addr)97 int arp_translate(ethip_nic_t *nic, addr32_t src_addr, addr32_t ip_addr, 98 addr48_t mac_addr) 91 99 { 92 int rc; 93 arp_eth_packet_t packet; 94 95 rc = atrans_lookup(ip_addr, mac_addr); 100 int rc = atrans_lookup(ip_addr, mac_addr); 96 101 if (rc == EOK) 97 102 return EOK; 98 103 104 arp_eth_packet_t packet; 105 99 106 packet.opcode = aop_request; 100 packet.sender_hw_addr = nic->mac_addr;107 addr48(nic->mac_addr, packet.sender_hw_addr); 101 108 packet.sender_proto_addr = src_addr; 102 packet.target_hw_addr.addr = MAC48_BROADCAST;109 addr48(addr48_broadcast, packet.target_hw_addr); 103 110 packet.target_proto_addr = ip_addr; 104 111 105 112 rc = arp_send_packet(nic, &packet); 106 113 if (rc != EOK) … … 128 135 return rc; 129 136 130 frame.dest.addr = packet->target_hw_addr.addr;131 frame.src.addr = packet->sender_hw_addr.addr;137 addr48(packet->target_hw_addr, frame.dest); 138 addr48(packet->sender_hw_addr, frame.src); 132 139 frame.etype_len = ETYPE_ARP; 133 140 frame.data = pdata; -
uspace/srv/net/ethip/arp.h
redf0d27 r02a09ed 39 39 40 40 #include <inet/iplink_srv.h> 41 #include <inet/addr.h> 41 42 #include "ethip.h" 42 43 43 44 extern void arp_received(ethip_nic_t *, eth_frame_t *); 44 extern int arp_translate(ethip_nic_t *, uint32_t, uint32_t, mac48_addr_t *);45 extern int arp_translate(ethip_nic_t *, addr32_t, addr32_t, addr48_t); 45 46 46 47 #endif -
uspace/srv/net/ethip/atrans.c
redf0d27 r02a09ed 62 62 } 63 63 64 int atrans_add(uint32_t ip_addr, mac48_addr_t *mac_addr)64 int atrans_add(uint32_t ip_addr, addr48_t mac_addr) 65 65 { 66 66 ethip_atrans_t *atrans; … … 72 72 73 73 atrans->ip_addr = ip_addr; 74 a trans->mac_addr = *mac_addr;74 addr48(mac_addr, atrans->mac_addr); 75 75 76 76 fibril_mutex_lock(&atrans_list_lock); … … 106 106 } 107 107 108 int atrans_lookup(uint32_t ip_addr, mac48_addr_t *mac_addr)108 int atrans_lookup(uint32_t ip_addr, addr48_t mac_addr) 109 109 { 110 ethip_atrans_t *atrans;111 112 110 fibril_mutex_lock(&atrans_list_lock); 113 atrans = atrans_find(ip_addr);111 ethip_atrans_t *atrans = atrans_find(ip_addr); 114 112 if (atrans == NULL) { 115 113 fibril_mutex_unlock(&atrans_list_lock); 116 114 return ENOENT; 117 115 } 118 116 119 117 fibril_mutex_unlock(&atrans_list_lock); 120 *mac_addr = atrans->mac_addr;118 addr48(atrans->mac_addr, mac_addr); 121 119 return EOK; 122 120 } -
uspace/srv/net/ethip/atrans.h
redf0d27 r02a09ed 39 39 40 40 #include <inet/iplink_srv.h> 41 #include <inet/addr.h> 41 42 #include "ethip.h" 42 43 43 extern int atrans_add(uint32_t, mac48_addr_t *);44 extern int atrans_add(uint32_t, addr48_t); 44 45 extern int atrans_remove(uint32_t); 45 extern int atrans_lookup(uint32_t, mac48_addr_t *);46 extern int atrans_lookup(uint32_t, addr48_t); 46 47 extern int atrans_wait_timeout(suseconds_t); 47 48 -
uspace/srv/net/ethip/ethip.c
redf0d27 r02a09ed 44 44 #include <stdio.h> 45 45 #include <stdlib.h> 46 46 #include <net/socket_codes.h> 47 47 #include "arp.h" 48 48 #include "ethip.h" … … 55 55 static int ethip_open(iplink_srv_t *srv); 56 56 static int ethip_close(iplink_srv_t *srv); 57 static int ethip_send(iplink_srv_t *srv, iplink_s rv_sdu_t *sdu);57 static int ethip_send(iplink_srv_t *srv, iplink_sdu_t *sdu); 58 58 static int ethip_get_mtu(iplink_srv_t *srv, size_t *mtu); 59 static int ethip_addr_add(iplink_srv_t *srv, uint32_taddr);60 static int ethip_addr_remove(iplink_srv_t *srv, uint32_taddr);59 static int ethip_addr_add(iplink_srv_t *srv, inet_addr_t *addr); 60 static int ethip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr); 61 61 62 62 static void ethip_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg); … … 164 164 } 165 165 166 static int ethip_send(iplink_srv_t *srv, iplink_srv_sdu_t *sdu) 167 { 168 ethip_nic_t *nic = (ethip_nic_t *)srv->arg; 166 static int ethip_send(iplink_srv_t *srv, iplink_sdu_t *sdu) 167 { 168 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_send()"); 169 170 ethip_nic_t *nic = (ethip_nic_t *) srv->arg; 171 172 addr32_t src_v4; 173 addr128_t src_v6; 174 uint16_t src_af = inet_addr_get(&sdu->src, &src_v4, &src_v6); 175 176 addr32_t dest_v4; 177 addr128_t dest_v6; 178 uint16_t dest_af = inet_addr_get(&sdu->dest, &dest_v4, &dest_v6); 179 180 if (src_af != dest_af) 181 return EINVAL; 182 183 int rc; 169 184 eth_frame_t frame; 185 186 switch (src_af) { 187 case AF_INET: 188 rc = arp_translate(nic, src_v4, dest_v4, frame.dest); 189 if (rc != EOK) { 190 log_msg(LOG_DEFAULT, LVL_WARN, "Failed to look up IPv4 address 0x%" 191 PRIx32, dest_v4); 192 return rc; 193 } 194 195 addr48(nic->mac_addr, frame.src); 196 frame.etype_len = ETYPE_IP; 197 frame.data = sdu->data; 198 frame.size = sdu->size; 199 200 break; 201 case AF_INET6: 202 // FIXME TODO 203 return ENOTSUP; 204 default: 205 return EINVAL; 206 } 207 170 208 void *data; 171 209 size_t size; 172 mac48_addr_t dest_mac_addr;173 int rc;174 175 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_send()");176 177 rc = arp_translate(nic, sdu->lsrc, sdu->ldest, &dest_mac_addr);178 if (rc != EOK) {179 log_msg(LOG_DEFAULT, LVL_WARN, "Failed to look up IP address 0x%" PRIx32,180 sdu->ldest);181 return rc;182 }183 184 frame.dest = dest_mac_addr;185 frame.src = nic->mac_addr;186 frame.etype_len = ETYPE_IP;187 frame.data = sdu->data;188 frame.size = sdu->size;189 190 210 rc = eth_pdu_encode(&frame, &data, &size); 191 211 if (rc != EOK) … … 201 221 { 202 222 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_received(): srv=%p", srv); 203 ethip_nic_t *nic = (ethip_nic_t *)srv->arg; 223 ethip_nic_t *nic = (ethip_nic_t *) srv->arg; 224 225 log_msg(LOG_DEFAULT, LVL_DEBUG, " - eth_pdu_decode"); 226 204 227 eth_frame_t frame; 205 iplink_srv_sdu_t sdu; 206 int rc; 207 208 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_received()"); 209 210 log_msg(LOG_DEFAULT, LVL_DEBUG, " - eth_pdu_decode"); 211 rc = eth_pdu_decode(data, size, &frame); 228 int rc = eth_pdu_decode(data, size, &frame); 212 229 if (rc != EOK) { 213 230 log_msg(LOG_DEFAULT, LVL_DEBUG, " - eth_pdu_decode failed"); 214 231 return rc; 215 232 } 216 233 234 iplink_recv_sdu_t sdu; 235 217 236 switch (frame.etype_len) { 218 237 case ETYPE_ARP: … … 221 240 case ETYPE_IP: 222 241 log_msg(LOG_DEFAULT, LVL_DEBUG, " - construct SDU"); 223 sdu.lsrc = 0;224 sdu.ldest = 0;225 242 sdu.data = frame.data; 226 243 sdu.size = frame.size; 227 244 log_msg(LOG_DEFAULT, LVL_DEBUG, " - call iplink_ev_recv"); 228 rc = iplink_ev_recv(&nic->iplink, &sdu );245 rc = iplink_ev_recv(&nic->iplink, &sdu, AF_INET); 229 246 break; 230 247 default: … … 244 261 } 245 262 246 static int ethip_addr_add(iplink_srv_t *srv, uint32_t addr) 247 { 248 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_addr_add(0x%" PRIx32 ")", addr); 249 263 static int ethip_addr_add(iplink_srv_t *srv, inet_addr_t *addr) 264 { 250 265 ethip_nic_t *nic = (ethip_nic_t *) srv->arg; 251 266 … … 253 268 } 254 269 255 static int ethip_addr_remove(iplink_srv_t *srv, uint32_t addr) 256 { 257 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_addr_remove(0x%" PRIx32 ")", addr); 258 259 ethip_nic_t *nic = (ethip_nic_t *)srv->arg; 260 261 return ethip_nic_addr_add(nic, addr); 270 static int ethip_addr_remove(iplink_srv_t *srv, inet_addr_t *addr) 271 { 272 ethip_nic_t *nic = (ethip_nic_t *) srv->arg; 273 274 return ethip_nic_addr_remove(nic, addr); 262 275 } 263 276 -
uspace/srv/net/ethip/ethip.h
redf0d27 r02a09ed 41 41 #include <async.h> 42 42 #include <inet/iplink_srv.h> 43 #include <inet/addr.h> 43 44 #include <loc.h> 44 45 #include <sys/types.h> 45 46 46 #define MAC48_BROADCAST 0xffffffffffff47 48 47 typedef struct { 49 48 link_t addr_list; 50 uint32_t addr;49 inet_addr_t addr; 51 50 } ethip_link_addr_t; 52 53 /** IEEE MAC-48 identifier */54 typedef struct {55 /** MAC Address (in lowest 48 bits) */56 uint64_t addr;57 } mac48_addr_t;58 51 59 52 typedef struct ethip_nic { … … 67 60 68 61 /** MAC address */ 69 mac48_addr_t mac_addr;62 addr48_t mac_addr; 70 63 /** List of IP addresses configured on this link */ 71 64 list_t addr_list; /* of ethip_link_addr_t */ … … 75 68 typedef struct { 76 69 /** Destination Address */ 77 mac48_addr_t dest;70 addr48_t dest; 78 71 /** Source Address */ 79 mac48_addr_t src;72 addr48_t src; 80 73 /** Ethertype or Length */ 81 74 uint16_t etype_len; … … 102 95 arp_opcode_t opcode; 103 96 /** Sender hardware address */ 104 mac48_addr_t sender_hw_addr;97 addr48_t sender_hw_addr; 105 98 /** Sender protocol address */ 106 99 uint32_t sender_proto_addr; 107 100 /** Target hardware address */ 108 mac48_addr_t target_hw_addr;101 addr48_t target_hw_addr; 109 102 /** Target protocol address */ 110 103 uint32_t target_proto_addr; … … 115 108 link_t atrans_list; 116 109 uint32_t ip_addr; 117 mac48_addr_t mac_addr;110 addr48_t mac_addr; 118 111 } ethip_atrans_t; 119 112 -
uspace/srv/net/ethip/ethip_nic.c
redf0d27 r02a09ed 121 121 } 122 122 123 static ethip_link_addr_t *ethip_nic_addr_new( uint32_taddr)123 static ethip_link_addr_t *ethip_nic_addr_new(inet_addr_t *addr) 124 124 { 125 125 ethip_link_addr_t *laddr = calloc(1, sizeof(ethip_link_addr_t)); … … 131 131 132 132 link_initialize(&laddr->addr_list); 133 laddr->addr = addr;133 laddr->addr = *addr; 134 134 135 135 return laddr; … … 193 193 goto error; 194 194 } 195 196 mac48_decode(nic_address.address, &nic->mac_addr);195 196 addr48(nic_address.address, nic->mac_addr); 197 197 198 198 rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE); … … 203 203 } 204 204 205 log_msg(LOG_DEFAULT, LVL_DEBUG, "Initialized IP link service, MAC = 0x%" PRIx64, 206 nic->mac_addr.addr); 205 log_msg(LOG_DEFAULT, LVL_DEBUG, "Initialized IP link service,"); 207 206 208 207 return EOK; … … 335 334 } 336 335 337 int ethip_nic_addr_add(ethip_nic_t *nic, uint32_taddr)336 int ethip_nic_addr_add(ethip_nic_t *nic, inet_addr_t *addr) 338 337 { 339 338 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_add()"); … … 347 346 } 348 347 349 int ethip_nic_addr_remove(ethip_nic_t *nic, uint32_taddr)348 int ethip_nic_addr_remove(ethip_nic_t *nic, inet_addr_t *addr) 350 349 { 351 350 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_remove()"); … … 361 360 362 361 ethip_link_addr_t *ethip_nic_addr_find(ethip_nic_t *nic, 363 uint32_taddr)362 inet_addr_t *addr) 364 363 { 365 364 log_msg(LOG_DEFAULT, LVL_DEBUG, "ethip_nic_addr_find()"); … … 369 368 ethip_link_addr_t, addr_list); 370 369 371 if ( addr == laddr->addr)370 if (inet_addr_compare(addr, &laddr->addr)) 372 371 return laddr; 373 372 } -
uspace/srv/net/ethip/ethip_nic.h
redf0d27 r02a09ed 39 39 40 40 #include <ipc/loc.h> 41 #include <inet/addr.h> 41 42 #include "ethip.h" 42 43 … … 44 45 extern ethip_nic_t *ethip_nic_find_by_iplink_sid(service_id_t); 45 46 extern int ethip_nic_send(ethip_nic_t *, void *, size_t); 46 extern int ethip_nic_addr_add(ethip_nic_t *, uint32_t);47 extern int ethip_nic_addr_remove(ethip_nic_t *, uint32_t);48 extern ethip_link_addr_t *ethip_nic_addr_find(ethip_nic_t *, uint32_t);47 extern int ethip_nic_addr_add(ethip_nic_t *, inet_addr_t *); 48 extern int ethip_nic_addr_remove(ethip_nic_t *, inet_addr_t *); 49 extern ethip_link_addr_t *ethip_nic_addr_find(ethip_nic_t *, inet_addr_t *); 49 50 50 51 #endif -
uspace/srv/net/ethip/pdu.c
redf0d27 r02a09ed 62 62 63 63 hdr = (eth_header_t *)data; 64 mac48_encode(&frame->src, hdr->src);65 mac48_encode(&frame->dest, hdr->dest);64 addr48(frame->src, hdr->src); 65 addr48(frame->dest, hdr->dest); 66 66 hdr->etype_len = host2uint16_t_be(frame->etype_len); 67 67 … … 69 69 frame->size); 70 70 71 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoding Ethernet frame "72 "src=%" PRIx64 " dest=%" PRIx64 " etype=%x",73 frame->src.addr, frame->dest.addr, frame->etype_len);74 71 log_msg(LOG_DEFAULT, LVL_DEBUG, "Encoded Ethernet frame (%zu bytes)", size); 75 72 … … 98 95 return ENOMEM; 99 96 100 mac48_decode(hdr->src, &frame->src);101 mac48_decode(hdr->dest, &frame->dest);97 addr48(hdr->src, frame->src); 98 addr48(hdr->dest, frame->dest); 102 99 frame->etype_len = uint16_t_be2host(hdr->etype_len); 103 100 … … 105 102 frame->size); 106 103 107 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoding Ethernet frame "108 "src=%" PRIx64 " dest=%" PRIx64 " etype=%x",109 frame->src.addr, frame->dest.addr, frame->etype_len);110 104 log_msg(LOG_DEFAULT, LVL_DEBUG, "Decoded Ethernet frame payload (%zu bytes)", frame->size); 111 105 112 106 return EOK; 113 }114 115 void mac48_encode(mac48_addr_t *addr, void *buf)116 {117 uint64_t val;118 uint8_t *bbuf = (uint8_t *)buf;119 int i;120 121 val = addr->addr;122 for (i = 0; i < MAC48_BYTES; i++)123 bbuf[i] = (val >> (8 * (MAC48_BYTES - i - 1))) & 0xff;124 }125 126 void mac48_decode(void *data, mac48_addr_t *addr)127 {128 uint64_t val;129 uint8_t *bdata = (uint8_t *)data;130 int i;131 132 val = 0;133 for (i = 0; i < MAC48_BYTES; i++)134 val |= (uint64_t)bdata[i] << (8 * (MAC48_BYTES - i - 1));135 136 addr->addr = val;137 107 } 138 108 … … 168 138 pfmt->proto_addr_size = IPV4_ADDR_SIZE; 169 139 pfmt->opcode = host2uint16_t_be(fopcode); 170 mac48_encode(&packet->sender_hw_addr, pfmt->sender_hw_addr);140 addr48(packet->sender_hw_addr, pfmt->sender_hw_addr); 171 141 pfmt->sender_proto_addr = 172 142 host2uint32_t_be(packet->sender_proto_addr); 173 mac48_encode(&packet->target_hw_addr, pfmt->target_hw_addr);143 addr48(packet->target_hw_addr, pfmt->target_hw_addr); 174 144 pfmt->target_proto_addr = 175 145 host2uint32_t_be(packet->target_proto_addr); … … 227 197 } 228 198 229 mac48_decode(pfmt->sender_hw_addr, &packet->sender_hw_addr);199 addr48(pfmt->sender_hw_addr, packet->sender_hw_addr); 230 200 packet->sender_proto_addr = 231 201 uint32_t_be2host(pfmt->sender_proto_addr); 232 mac48_decode(pfmt->target_hw_addr, &packet->target_hw_addr);202 addr48(pfmt->target_hw_addr, packet->target_hw_addr); 233 203 packet->target_proto_addr = 234 204 uint32_t_be2host(pfmt->target_proto_addr); -
uspace/srv/net/ethip/pdu.h
redf0d27 r02a09ed 42 42 extern int eth_pdu_encode(eth_frame_t *, void **, size_t *); 43 43 extern int eth_pdu_decode(void *, size_t, eth_frame_t *); 44 extern void mac48_encode(mac48_addr_t *, void *);45 extern void mac48_decode(void *, mac48_addr_t *);46 44 extern int arp_pdu_encode(arp_eth_packet_t *, void **, size_t *); 47 45 extern int arp_pdu_decode(void *, size_t, arp_eth_packet_t *); -
uspace/srv/net/ethip/std.h
redf0d27 r02a09ed 39 39 40 40 #include <sys/types.h> 41 #include <inet/addr.h> 41 42 42 43 #define ETH_ADDR_SIZE 6 … … 47 48 typedef struct { 48 49 /** Destination Address */ 49 uint8_t dest[ETH_ADDR_SIZE];50 addr48_t dest; 50 51 /** Source Address */ 51 uint8_t src[ETH_ADDR_SIZE];52 addr48_t src; 52 53 /** Ethertype or Length */ 53 54 uint16_t etype_len; … … 67 68 uint16_t opcode; 68 69 /** Sender hardware address */ 69 uint8_t sender_hw_addr[ETH_ADDR_SIZE];70 addr48_t sender_hw_addr; 70 71 /** Sender protocol address */ 71 72 uint32_t sender_proto_addr; 72 73 /** Target hardware address */ 73 uint8_t target_hw_addr[ETH_ADDR_SIZE];74 addr48_t target_hw_addr; 74 75 /** Target protocol address */ 75 76 uint32_t target_proto_addr; … … 87 88 /** IP Ethertype */ 88 89 enum ether_type { 89 ETYPE_ARP = 0x0806, 90 ETYPE_IP = 0x0800 90 ETYPE_ARP = 0x0806, 91 ETYPE_IP = 0x0800, 92 ETYPE_IPV6 = 0x86DD 91 93 }; 92 94
Note:
See TracChangeset
for help on using the changeset viewer.
