Lines Matching refs:ip

63 #include <netinet/ip.h>
158 /* ip address formatting macros */
160 #define IP_CH(ip) ((const uint8_t *)ip)
161 #define IP_LIST(ip) IP_CH(ip)[0],IP_CH(ip)[1],IP_CH(ip)[2],IP_CH(ip)[3]
183 bzero(&pkt->ip, sizeof(pkt->ip));
185 pkt->ip.ip_v = IPVERSION;
186 pkt->ip.ip_hl = sizeof(struct ip) >> 2;
187 pkt->ip.ip_ttl = MAXTTL;
188 pkt->ip.ip_p = IPPROTO_UDP;
189 pkt->ip.ip_src.s_addr = 0;
190 pkt->ip.ip_dst.s_addr = htonl(INADDR_BROADCAST);
191 pkt->ip.ip_len = htons(pkt_size);
192 pkt->ip.ip_sum = 0;
196 pkt->udp.uh_ulen = htons(pkt_size - sizeof(pkt->ip));
251 struct ip * ip;
261 ip = mtod(m, struct ip *);
262 ip->ip_sum = 0;
263 ip->ip_sum = in_cksum(m, sizeof(struct ip));
399 const struct in_addr * ip;
430 ip = (const struct in_addr *)
433 if (ip != NULL && len >= (int)sizeof(*ip)) {
434 server_id = *ip;
455 ip = (const struct in_addr *)
458 if (ip != NULL && len >= (int)sizeof(*ip)) {
459 context->netmask = *ip;
461 ip = (const struct in_addr *)
463 if (ip != NULL && len >= (int)sizeof(*ip)) {
464 context->router = *ip;
512 /* insert server identifier and requested ip address */
540 request->ip.ip_id = ip_randomid();
542 request->ip.ip_id = htons(ip_id++);
587 const struct in_addr * ip;
625 ip = (const struct in_addr *)
628 if (ip == NULL || len < (int)sizeof(*ip)) {
634 IP_LIST(ip), IP_LIST(&reply->dp_yiaddr));
635 server_id = *ip;
639 ip = (const struct in_addr *)
642 if (ip != NULL && len >= (int)sizeof(*ip)) {
643 context->netmask = *ip;
645 ip = (const struct in_addr *)
647 if (ip != NULL && len >= (int)sizeof(*ip)) {
648 context->router = *ip;
741 request->ip.ip_id = ip_randomid();
743 request->ip.ip_id = htons(ip_id++);