Lines Matching refs:nic

19 #include "nic.h"
94 /* See nic.h */
122 struct nic nic =
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;
187 return ((*nic.poll)(&nic, retrieve));
192 (*nic.transmit)(&nic, d, t, s, p);
204 disable(&nic.dev);
209 (*nic.irq)(&nic,action);
284 if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest))
286 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN];
430 QDRAIN - clear the nic's receive queue
461 if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest))
463 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN];
535 &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)];
536 len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) +
632 &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)];
633 len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) +
781 (nic.packetlen < sizeof(struct iphdr) + sizeof(struct igmp))) {
785 igmp = (struct igmp *)&nic.packet[sizeof(struct iphdr)];
919 if (nic.packetlen >= ETH_HLEN) {
920 ptype = ((unsigned short) nic.packet[12]) << 8
921 | ((unsigned short) nic.packet[13]);
925 if ((ptype == IP) && (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr))) {
927 ip = (struct iphdr *)&nic.packet[ETH_HLEN];
949 memmove(&nic.packet[ETH_HLEN + sizeof(struct iphdr)],
950 &nic.packet[ETH_HLEN + iplen],
951 nic.packetlen - ipoptlen);
952 nic.packetlen -= ipoptlen;
957 (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr))) {
958 udp = (struct udphdr *)&nic.packet[ETH_HLEN + sizeof(struct iphdr)];
978 (nic.packetlen >= ETH_HLEN + sizeof(struct arprequest))) {
982 arpreply = (struct arprequest *)&nic.packet[ETH_HLEN];