Lines Matching refs:item

46 	struct xid_item *item;  in xid_add()  local
49 item = xmalloc(sizeof(struct xid_item)); in xid_add()
52 item->ip = *ip; in xid_add()
53 item->xid = xid; in xid_add()
54 item->iface_no = iface_no; in xid_add()
55 item->timestamp = monotonic_sec(); in xid_add()
56 item->next = dhcprelay_xid_list.next; in xid_add()
57 dhcprelay_xid_list.next = item; in xid_add()
59 return item; in xid_add()
64 struct xid_item *item = dhcprelay_xid_list.next; in xid_expire() local
68 while (item != NULL) { in xid_expire()
69 if ((current_time - item->timestamp) > MAX_LIFETIME) { in xid_expire()
70 last->next = item->next; in xid_expire()
71 free(item); in xid_expire()
72 item = last->next; in xid_expire()
74 last = item; in xid_expire()
75 item = item->next; in xid_expire()
82 struct xid_item *item = dhcprelay_xid_list.next; in xid_find() local
83 while (item != NULL) { in xid_find()
84 if (item->xid == xid) { in xid_find()
87 item = item->next; in xid_find()
89 return item; in xid_find()
94 struct xid_item *item = dhcprelay_xid_list.next; in xid_del() local
96 while (item != NULL) { in xid_del()
97 if (item->xid == xid) { in xid_del()
98 last->next = item->next; in xid_del()
99 free(item); in xid_del()
100 item = last->next; in xid_del()
102 last = item; in xid_del()
103 item = item->next; in xid_del()
235 struct xid_item *item; in pass_to_client() local
245 item = xid_find(p->xid); in pass_to_client()
246 if (!item) { in pass_to_client()
256 if (item->ip.sin_addr.s_addr == htonl(INADDR_ANY)) in pass_to_client()
257 item->ip.sin_addr.s_addr = htonl(INADDR_BROADCAST); in pass_to_client()
259 sendto_ip4(fds[item->iface_no], p, packet_len, &item->ip); in pass_to_client()