Lines Matching refs:arp

47     arp_entry_t *arp;  in arp_cache_update()  local
61 list_for_every_entry(&arp_list, arp, arp_entry_t, node) { in arp_cache_update()
62 if (arp->addr == addr) { in arp_cache_update()
63 arp->addr = addr; in arp_cache_update()
64 mru_update(&arp->node); in arp_cache_update()
74 arp = malloc(sizeof(arp_entry_t)); in arp_cache_update()
75 if (arp == NULL) { in arp_cache_update()
79 arp->addr = addr; in arp_cache_update()
80 memcpy(arp->mac, mac, sizeof(arp->mac)); in arp_cache_update()
81 list_add_head(&arp_list, &arp->node); in arp_cache_update()
91 arp_entry_t *arp = NULL; in arp_cache_lookup() local
97 list_for_every_entry(&arp_list, arp, arp_entry_t, node) { in arp_cache_lookup()
98 if (arp->addr == addr) { in arp_cache_lookup()
99 mru_update(&arp->node); in arp_cache_lookup()
100 ret = arp->mac; in arp_cache_lookup()
111 arp_entry_t *arp; in arp_cache_dump() local
114 list_for_every_entry(&arp_list, arp, arp_entry_t, node) { in arp_cache_dump()
116 ip.u = arp->addr; in arp_cache_dump()
119 arp->mac[0], arp->mac[1], arp->mac[2], arp->mac[3], arp->mac[4], arp->mac[5]); in arp_cache_dump()
129 struct arp_pkt *arp; in arp_send_request() local
136 arp = pktbuf_append(p, sizeof(struct arp_pkt)); in arp_send_request()
139 arp->htype = htons(0x0001); in arp_send_request()
140 arp->ptype = htons(0x0800); in arp_send_request()
141 arp->hlen = 6; in arp_send_request()
142 arp->plen = 4; in arp_send_request()
143 arp->oper = htons(ARP_OPER_REQUEST); in arp_send_request()
144 arp->spa = minip_get_ipaddr(); in arp_send_request()
145 arp->tpa = addr; in arp_send_request()
146 minip_get_macaddr(arp->sha); in arp_send_request()
147 mac_addr_copy(arp->tha, bcast_mac); in arp_send_request()