Lines Matching refs:nic

122 struct nic	nic =  variable
139 (int (*)(struct nic *, int))dummy, /* poll */
140 (void (*)(struct nic *, const char *,
143 (void (*)(struct nic *, irq_action_t))dummy, /* irq */
168 dev = &nic.dev; in grub_eth_probe()
187 return ((*nic.poll)(&nic, retrieve)); in eth_poll()
192 (*nic.transmit)(&nic, d, t, s, p); in eth_transmit()
204 disable(&nic.dev); in eth_disable()
209 (*nic.irq)(&nic,action); in eth_irq()
284 if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) in await_arp()
286 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; in await_arp()
461 if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) in await_rarp()
463 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; in await_rarp()
535 &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; in await_bootp()
536 len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + in await_bootp()
632 &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; in await_dhcp()
633 len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + in await_dhcp()
781 (nic.packetlen < sizeof(struct iphdr) + sizeof(struct igmp))) { in process_igmp()
785 igmp = (struct igmp *)&nic.packet[sizeof(struct iphdr)]; in process_igmp()
919 if (nic.packetlen >= ETH_HLEN) { in await_reply()
920 ptype = ((unsigned short) nic.packet[12]) << 8 in await_reply()
921 | ((unsigned short) nic.packet[13]); in await_reply()
925 if ((ptype == IP) && (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr))) { in await_reply()
927 ip = (struct iphdr *)&nic.packet[ETH_HLEN]; in await_reply()
949 memmove(&nic.packet[ETH_HLEN + sizeof(struct iphdr)], in await_reply()
950 &nic.packet[ETH_HLEN + iplen], in await_reply()
951 nic.packetlen - ipoptlen); in await_reply()
952 nic.packetlen -= ipoptlen; in await_reply()
957 (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr))) { in await_reply()
958 udp = (struct udphdr *)&nic.packet[ETH_HLEN + sizeof(struct iphdr)]; in await_reply()
978 (nic.packetlen >= ETH_HLEN + sizeof(struct arprequest))) { in await_reply()
982 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; in await_reply()