Lines Matching defs:item
40 struct xid_item *item;
43 item = xmalloc(sizeof(struct xid_item));
46 item->ip = *ip;
47 item->xid = xid;
48 item->client = client;
49 item->timestamp = monotonic_sec();
50 item->next = dhcprelay_xid_list.next;
51 dhcprelay_xid_list.next = item;
53 return item;
58 struct xid_item *item = dhcprelay_xid_list.next;
62 while (item != NULL) {
63 if ((current_time - item->timestamp) > MAX_LIFETIME) {
64 last->next = item->next;
65 free(item);
66 item = last->next;
68 last = item;
69 item = item->next;
76 struct xid_item *item = dhcprelay_xid_list.next;
77 while (item != NULL) {
78 if (item->xid == xid) {
81 item = item->next;
83 return item;
88 struct xid_item *item = dhcprelay_xid_list.next;
90 while (item != NULL) {
91 if (item->xid == xid) {
92 last->next = item->next;
93 free(item);
94 item = last->next;
96 last = item;
97 item = item->next;
225 struct xid_item *item;
228 item = xid_find(p->xid);
229 if (!item) {
240 if (item->ip.sin_addr.s_addr == htonl(INADDR_ANY))
241 item->ip.sin_addr.s_addr = htonl(INADDR_BROADCAST);
243 if (sendto_ip4(fds[item->client], p, packet_len, &item->ip) != 0) {