Lines Matching refs:pkt
108 uchar *pkt; in cdp_send_trigger() local
119 pkt = net_tx_packet; in cdp_send_trigger()
120 et = (struct ethernet_hdr *)pkt; in cdp_send_trigger()
128 pkt += ETHER_HDR_SIZE; in cdp_send_trigger()
131 memcpy((uchar *)pkt, cdp_snap_hdr, sizeof(cdp_snap_hdr)); in cdp_send_trigger()
132 pkt += sizeof(cdp_snap_hdr); in cdp_send_trigger()
135 *pkt++ = 0x02; /* CDP version 2 */ in cdp_send_trigger()
136 *pkt++ = 180; /* TTL */ in cdp_send_trigger()
137 s = (ushort *)pkt; in cdp_send_trigger()
239 void cdp_receive(const uchar *pkt, unsigned len) in cdp_receive() argument
251 if (memcmp(pkt, cdp_snap_hdr, sizeof(cdp_snap_hdr)) != 0) in cdp_receive()
254 pkt += sizeof(cdp_snap_hdr); in cdp_receive()
258 if (pkt[0] < 0x02 || pkt[1] == 0) in cdp_receive()
265 if (pkt[0] != 0x02) in cdp_receive()
267 "%d > 2\n", pkt[0] & 0xff); in cdp_receive()
269 if (cdp_compute_csum(pkt, len) != 0) in cdp_receive()
272 pkt += 4; in cdp_receive()
281 ss = (const ushort *)pkt; in cdp_receive()
287 pkt += tlen; in cdp_receive()