Home | History | Annotate | Download | only in netboot

Lines Matching defs:ip

50 /* Set if an ethernet card is probed and IP addresses are set.  */
110 static unsigned short ipchksum (unsigned short *ip, int len);
131 DEFAULT_NETMASK - Return default netmask for IP address
147 ifconfig (char *ip, char *sm, char *gw, char *svr)
159 if (ip)
161 if (! inet_aton (ip, &arptable[ARP_CLIENT].ipaddr))
180 if (ip || sm)
201 struct iphdr *ip;
207 ip = (struct iphdr *) buf;
209 ip->verhdrlen = 0x45;
210 ip->service = 0;
211 ip->len = htons (len);
212 ip->ident = 0;
213 ip->frags = 0;
214 ip->ttl = 60;
215 ip->protocol = IP_UDP;
216 ip->chksum = 0;
217 ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr;
218 ip->dest.s_addr = destip;
219 ip->chksum = ipchksum ((unsigned short *) buf, sizeof (struct iphdr));
224 udp->chksum = htons (udpchksum (ip));
231 eth_transmit (broadcast, IP, len, buf);
261 arpreq.protocol = htons (IP);
290 eth_transmit (arptable[arpentry].node, IP, len, buf);
323 + sizeof (tp.ip) + sizeof (tp.udp) + sizeof (tp.opcode) + 1);
411 + sizeof (tp.ip) + sizeof (tp.udp)
474 RARP - Get my IP address and load information
494 rarpreq.protocol = htons (IP);
529 BOOTP - Get my IP address and load information
538 struct bootpip_t ip;
552 grub_memset (&ip, 0, sizeof (struct bootpip_t));
553 ip.bp.bp_op = BOOTP_REQUEST;
554 ip.bp.bp_htype = 1;
555 ip.bp.bp_hlen = ETH_ALEN;
560 ip.bp.bp_xid = xid += htonl (starttime);
561 grub_memmove (ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN);
563 etherboot_printf ("bp_op = %d\n", ip.bp.bp_op);
564 etherboot_printf ("bp_htype = %d\n", ip.bp.bp_htype);
565 etherboot_printf ("bp_hlen = %d\n", ip.bp.bp_hlen);
566 etherboot_printf ("bp_xid = %d\n", ip.bp.bp_xid);
567 etherboot_printf ("bp_hwaddr = %!\n", ip.bp.bp_hwaddr);
568 etherboot_printf ("bp_hops = %d\n", (int) ip.bp.bp_hops);
569 etherboot_printf ("bp_secs = %d\n", (int) ip.bp.bp_hwaddr);
574 grub_memmove (ip.bp.bp_vend, rfc1533_cookie, 5);
577 grub_memmove (ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie);
578 grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie, dhcpdiscover,
580 grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie + sizeof dhcpdiscover,
602 sizeof (struct bootpip_t), &ip);
621 etherboot_printf ("bp_op = %d\n", (int) ip.bp.bp_op);
622 etherboot_printf ("bp_htype = %d\n", (int) ip.bp.bp_htype);
623 etherboot_printf ("bp_hlen = %d\n", (int) ip.bp.bp_hlen);
624 etherboot_printf ("bp_xid = %d\n", (int) ip.bp.bp_xid);
625 etherboot_printf ("bp_hwaddr = %!\n", ip.bp.bp_hwaddr);
626 etherboot_printf ("bp_hops = %d\n", (int) ip.bp.bp_hops);
627 etherboot_printf ("bp_secs = %d\n", (int) ip.bp.bp_hwaddr);
629 grub_memmove (ip.bp.bp_vend, rfc1533_cookie, sizeof rfc1533_cookie);
630 grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie,
632 grub_memmove (ip.bp.bp_vend + sizeof rfc1533_cookie
635 grub_memmove (ip.bp.bp_vend + 9, (char *) &dhcp_server,
637 grub_memmove (ip.bp.bp_vend + 15, (char *) &dhcp_addr,
650 sizeof (struct bootpip_t), &ip);
676 ip.bp.bp_secs = htons ((currticks () - starttime) / TICKS_PER_SEC);
742 struct iphdr *ip;
763 /* Check for ARP - No IP hdr. */
822 /* Check for RARP - No IP hdr. */
844 /* Anything else has IP header. */
845 if (nic.packetlen < protohdrlen || ptype != IP)
848 ip = (struct iphdr *) &nic.packet[ETH_HLEN];
849 if (ip->verhdrlen != 0x45
850 || ipchksum ((unsigned short *) ip, sizeof (struct iphdr))
851 || ip->protocol != IP_UDP)
864 if (ip->frags & htons(0x3FFF))
872 if (udp->chksum && udpchksum (ip))
1114 IPCHKSUM - Checksum IP Header
1117 ipchksum (unsigned short *ip, int len)
1123 sum += *(ip++);