Lines Matching refs:item
35 struct xid_item *item;
38 item = xmalloc(sizeof(struct xid_item));
41 item->ip = *ip;
42 item->xid = xid;
43 item->client = client;
44 item->timestamp = time(NULL);
45 item->next = dhcprelay_xid_list.next;
46 dhcprelay_xid_list.next = item;
48 return item;
53 struct xid_item *item = dhcprelay_xid_list.next;
57 while (item != NULL) {
58 if ((current_time - item->timestamp) > MAX_LIFETIME) {
59 last->next = item->next;
60 free(item);
61 item = last->next;
63 last = item;
64 item = item->next;
71 struct xid_item *item = dhcprelay_xid_list.next;
72 while (item != NULL) {
73 if (item->xid == xid) {
74 return item;
76 item = item->next;
83 struct xid_item *item = dhcprelay_xid_list.next;
85 while (item != NULL) {
86 if (item->xid == xid) {
87 last->next = item->next;
88 free(item);
89 item = last->next;
91 last = item;
92 item = item->next;
196 struct xid_item *item;
208 item = xid_add(p->xid, client_addr, client);
226 struct xid_item *item;
229 item = xid_find(p->xid);
230 if (!item) {
240 if (item->ip.sin_addr.s_addr == htonl(INADDR_ANY))
241 item->ip.sin_addr.s_addr = htonl(INADDR_BROADCAST);
242 if (item->client > MAX_INTERFACES)
244 res = sendto(fds[item->client], p, packet_len, 0, (struct sockaddr*)(&item->ip),
245 sizeof(item->ip));