Changeset 158 for uKadecot/trunk/uip/net/ipv4/uip_arp.c
- Timestamp:
- Feb 20, 2016, 10:43:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uKadecot/trunk/uip/net/ipv4/uip_arp.c
r157 r158 60 60 61 61 62 #include " uip_arp.h"62 #include "net/ipv4/uip_arp.h" 63 63 64 64 #include <string.h> … … 72 72 struct arp_hdr { 73 73 struct uip_eth_hdr ethhdr; 74 u 16_t hwtype;75 u 16_t protocol;76 u 8_t hwlen;77 u 8_t protolen;78 u 16_t opcode;74 uint16_t hwtype; 75 uint16_t protocol; 76 uint8_t hwlen; 77 uint8_t protolen; 78 uint16_t opcode; 79 79 struct uip_eth_addr shwaddr; 80 u 16_t sipaddr[2];80 uint16_t sipaddr[2]; 81 81 struct uip_eth_addr dhwaddr; 82 u 16_t dipaddr[2];82 uint16_t dipaddr[2]; 83 83 }; 84 84 … … 86 86 struct uip_eth_hdr ethhdr; 87 87 /* IP header. */ 88 u 8_t vhl,88 uint8_t vhl, 89 89 tos, 90 90 len[2], … … 93 93 ttl, 94 94 proto; 95 u 16_t ipchksum;96 u 16_t srcipaddr[2],95 uint16_t ipchksum; 96 uint16_t srcipaddr[2], 97 97 destipaddr[2]; 98 98 }; … … 110 110 111 111 struct arp_entry { 112 u 16_t ipaddr[2];112 uint16_t ipaddr[2]; 113 113 struct uip_eth_addr ethaddr; 114 u 8_t time;114 uint8_t time; 115 115 }; 116 116 117 117 static const struct uip_eth_addr broadcast_ethaddr = 118 118 {{0xff,0xff,0xff,0xff,0xff,0xff}}; 119 static const u 16_t broadcast_ipaddr[2] = {0xffff,0xffff};120 static const u 16_t multicast_ipaddr[2] = { 0x00e0, 0x0000 };121 static const u 16_t multicast_mask[2] = { 0x00f0, 0x0000 };119 static const uint16_t broadcast_ipaddr[2] = {0xffff,0xffff}; 120 static const uint16_t multicast_ipaddr[2] = { 0x00e0, 0x0000 }; 121 static const uint16_t multicast_mask[2] = { 0x00f0, 0x0000 }; 122 122 123 123 static struct arp_entry arp_table[UIP_ARPTAB_SIZE]; 124 static u 16_t ipaddr[2];125 static u 8_t i, c;126 127 static u 8_t arptime;128 static u 8_t tmpage;124 static uint16_t ipaddr[2]; 125 static uint8_t i, c; 126 127 static uint8_t arptime; 128 static uint8_t tmpage; 129 129 130 130 #define BUF ((struct arp_hdr *)&uip_buf[0]) … … 170 170 /*-----------------------------------------------------------------------------------*/ 171 171 static void 172 uip_arp_update(u 16_t *ipaddr, struct uip_eth_addr *ethaddr)172 uip_arp_update(uint16_t *ipaddr, struct uip_eth_addr *ethaddr) 173 173 { 174 174 register struct arp_entry *tabptr = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.