Lines Matching refs:packet

511         packet = DhcpPacket()
512 packet.set_field(FIELD_OP, FIELD_VALUE_OP_CLIENT_REQUEST)
513 packet.set_field(FIELD_HWTYPE, FIELD_VALUE_HWTYPE_10MB_ETH)
514 packet.set_field(FIELD_HWADDR_LEN, FIELD_VALUE_HWADDR_LEN_10MB_ETH)
515 packet.set_field(FIELD_RELAY_HOPS, 0)
516 packet.set_field(FIELD_TRANSACTION_ID, random.getrandbits(32))
517 packet.set_field(FIELD_TIME_SINCE_START, 0)
518 packet.set_field(FIELD_FLAGS, 0)
519 packet.set_field(FIELD_CLIENT_IP, IPV4_NULL_ADDRESS)
520 packet.set_field(FIELD_YOUR_IP, IPV4_NULL_ADDRESS)
521 packet.set_field(FIELD_SERVER_IP, IPV4_NULL_ADDRESS)
522 packet.set_field(FIELD_GATEWAY_IP, IPV4_NULL_ADDRESS)
523 packet.set_field(FIELD_CLIENT_HWADDR, hwmac_addr)
524 packet.set_field(FIELD_MAGIC_COOKIE, FIELD_VALUE_MAGIC_COOKIE)
525 packet.set_option(OPTION_DHCP_MESSAGE_TYPE,
527 return packet
538 packet = DhcpPacket()
539 packet.set_field(FIELD_OP, FIELD_VALUE_OP_SERVER_RESPONSE)
540 packet.set_field(FIELD_HWTYPE, FIELD_VALUE_HWTYPE_10MB_ETH)
541 packet.set_field(FIELD_HWADDR_LEN, FIELD_VALUE_HWADDR_LEN_10MB_ETH)
543 packet.set_field(FIELD_RELAY_HOPS, 0)
544 packet.set_field(FIELD_TRANSACTION_ID, transaction_id)
545 packet.set_field(FIELD_TIME_SINCE_START, 0)
546 packet.set_field(FIELD_FLAGS, 0)
547 packet.set_field(FIELD_CLIENT_IP, IPV4_NULL_ADDRESS)
548 packet.set_field(FIELD_YOUR_IP, offer_ip)
549 packet.set_field(FIELD_SERVER_IP, server_ip)
550 packet.set_field(FIELD_GATEWAY_IP, IPV4_NULL_ADDRESS)
551 packet.set_field(FIELD_CLIENT_HWADDR, hwmac_addr)
552 packet.set_field(FIELD_MAGIC_COOKIE, FIELD_VALUE_MAGIC_COOKIE)
553 packet.set_option(OPTION_DHCP_MESSAGE_TYPE,
555 return packet
560 packet = DhcpPacket()
561 packet.set_field(FIELD_OP, FIELD_VALUE_OP_CLIENT_REQUEST)
562 packet.set_field(FIELD_HWTYPE, FIELD_VALUE_HWTYPE_10MB_ETH)
563 packet.set_field(FIELD_HWADDR_LEN, FIELD_VALUE_HWADDR_LEN_10MB_ETH)
565 packet.set_field(FIELD_RELAY_HOPS, 0)
566 packet.set_field(FIELD_TRANSACTION_ID, transaction_id)
567 packet.set_field(FIELD_TIME_SINCE_START, 0)
568 packet.set_field(FIELD_FLAGS, 0)
569 packet.set_field(FIELD_CLIENT_IP, IPV4_NULL_ADDRESS)
570 packet.set_field(FIELD_YOUR_IP, IPV4_NULL_ADDRESS)
571 packet.set_field(FIELD_SERVER_IP, IPV4_NULL_ADDRESS)
572 packet.set_field(FIELD_GATEWAY_IP, IPV4_NULL_ADDRESS)
573 packet.set_field(FIELD_CLIENT_HWADDR, hwmac_addr)
574 packet.set_field(FIELD_MAGIC_COOKIE, FIELD_VALUE_MAGIC_COOKIE)
575 packet.set_option(OPTION_DHCP_MESSAGE_TYPE,
577 return packet
584 packet = DhcpPacket()
585 packet.set_field(FIELD_OP, FIELD_VALUE_OP_SERVER_RESPONSE)
586 packet.set_field(FIELD_HWTYPE, FIELD_VALUE_HWTYPE_10MB_ETH)
587 packet.set_field(FIELD_HWADDR_LEN, FIELD_VALUE_HWADDR_LEN_10MB_ETH)
589 packet.set_field(FIELD_RELAY_HOPS, 0)
590 packet.set_field(FIELD_TRANSACTION_ID, transaction_id)
591 packet.set_field(FIELD_TIME_SINCE_START, 0)
592 packet.set_field(FIELD_FLAGS, 0)
593 packet.set_field(FIELD_CLIENT_IP, IPV4_NULL_ADDRESS)
594 packet.set_field(FIELD_YOUR_IP, granted_ip)
595 packet.set_field(FIELD_SERVER_IP, server_ip)
596 packet.set_field(FIELD_GATEWAY_IP, IPV4_NULL_ADDRESS)
597 packet.set_field(FIELD_CLIENT_HWADDR, hwmac_addr)
598 packet.set_field(FIELD_MAGIC_COOKIE, FIELD_VALUE_MAGIC_COOKIE)
599 packet.set_option(OPTION_DHCP_MESSAGE_TYPE,
601 return packet
611 packet = DhcpPacket()
612 packet.set_field(FIELD_OP, FIELD_VALUE_OP_SERVER_RESPONSE)
613 packet.set_field(FIELD_HWTYPE, FIELD_VALUE_HWTYPE_10MB_ETH)
614 packet.set_field(FIELD_HWADDR_LEN, FIELD_VALUE_HWADDR_LEN_10MB_ETH)
616 packet.set_field(FIELD_RELAY_HOPS, 0)
617 packet.set_field(FIELD_TRANSACTION_ID, transaction_id)
618 packet.set_field(FIELD_TIME_SINCE_START, 0)
619 packet.set_field(FIELD_FLAGS, 0)
620 packet.set_field(FIELD_CLIENT_IP, IPV4_NULL_ADDRESS)
621 packet.set_field(FIELD_YOUR_IP, IPV4_NULL_ADDRESS)
622 packet.set_field(FIELD_SERVER_IP, IPV4_NULL_ADDRESS)
623 packet.set_field(FIELD_GATEWAY_IP, IPV4_NULL_ADDRESS)
624 packet.set_field(FIELD_CLIENT_HWADDR, hwmac_addr)
625 packet.set_field(FIELD_MAGIC_COOKIE, FIELD_VALUE_MAGIC_COOKIE)
626 packet.set_option(OPTION_DHCP_MESSAGE_TYPE,
628 return packet