Lines Matching refs:pkt
280 pkt = packet.from_address(addr_txbufs)
281 ctypes.memset(addr_txbufs, 0, ctypes.sizeof(pkt))
284 pkt.dhcp_options[i] = options[i]
285 pkt.dhcp_magic = 0x63825363
287 pkt.bootp_chaddr[i] = mac[i]
288 pkt.bootp_hlen = 6
289 pkt.bootp_htype = 1
290 pkt.bootp_op = 1
291 pkt.udp_len = ctypes.sizeof(pkt) - 34
292 pkt.udp_dest = 67
293 pkt.udp_src = 68
294 pkt.ip_dest = 0xffffffff
295 pkt.ip_cksum = 0x79a6
296 pkt.ip_proto = 17
297 pkt.ip_ttl = 64
298 pkt.ip_len = ctypes.sizeof(pkt) - 14
299 pkt.ip_vl = 0x45
300 pkt.eth_type = 0x0800
302 pkt.eth_src[i] = mac[i]
303 pkt.eth_dest[i] = bcast[i]
304 pktlen = ctypes.sizeof(pkt)
332 pkt = packet.from_address(addr_rxbufs + i * bufsize)
333 if mac_is(pkt.eth_dest, bcast):
336 if not mac_is(pkt.eth_dest, mac):
337 logging.debug('RX #%d: packet for %s?' % (i, mac_str(pkt.eth_dest)))
339 logging.debug('RX %d: packet from %s!' % (i, mac_str(pkt.eth_src)))
340 logging.info('Our IP address = %s' % (ip_str(pkt.ip_dest)))