Home
last modified time | relevance | path

Searched refs:dhcp_packet (Results 1 – 21 of 21) sorted by relevance

/external/autotest/client/cros/
Ddhcp_unittest.py15 from autotest_lib.client.cros import dhcp_packet
54 discovery_packet = dhcp_packet.DhcpPacket(byte_str=binary_discovery_packet)
70 parsed_routes = dhcp_packet.ClasslessStaticRoutesOption.unpack(
81 byte_string = dhcp_packet.ClasslessStaticRoutesOption.pack(
95 parsed_domains = dhcp_packet.DomainListOption.unpack(
107 byte_string = dhcp_packet.DomainListOption.pack(
132 packet = dhcp_packet.DhcpPacket(byte_str=data)
149 discovery_message = dhcp_packet.DhcpPacket.create_discovery_packet(mac_addr)
151 dhcp_packet.OPTION_PARAMETER_REQUEST_LIST,
152 dhcp_packet.OPTION_VALUE_PARAMETER_REQUEST_LIST_DEFAULT)
[all …]
Ddhcp_handling_rule.py20 from autotest_lib.client.cros import dhcp_packet
288 dhcp_packet.MESSAGE_TYPE_DISCOVERY, additional_options,
311 response_packet = dhcp_packet.DhcpPacket.create_offer_packet(
317 dhcp_packet.OPTION_PARAMETER_REQUEST_LIST)
330 dhcp_packet.MESSAGE_TYPE_REQUEST, {}, {})
349 response_packet = dhcp_packet.DhcpPacket.create_nak_packet(
379 dhcp_packet.MESSAGE_TYPE_REQUEST, additional_options,
397 server_ip = query_packet.get_option(dhcp_packet.OPTION_SERVER_ID)
398 requested_ip = query_packet.get_option(dhcp_packet.OPTION_REQUESTED_IP)
431 response_packet = dhcp_packet.DhcpPacket.create_acknowledgement_packet(
[all …]
Ddhcp_test_base.py23 from autotest_lib.client.cros import dhcp_packet
245 if dhcp_packet.OPTION_REQUESTED_IP not in dhcp_options:
248 intended_ip = dhcp_options[dhcp_packet.OPTION_REQUESTED_IP]
305 expected_address = dhcp_options.get(dhcp_packet.OPTION_REQUESTED_IP)
324 expected_dns_servers = dhcp_options.get(dhcp_packet.OPTION_DNS_SERVERS)
333 expected_domain_name = dhcp_options.get(dhcp_packet.OPTION_DOMAIN_NAME)
341 expected_host_name = dhcp_options.get(dhcp_packet.OPTION_HOST_NAME)
350 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST)
358 expected_routers = dhcp_options.get(dhcp_packet.OPTION_ROUTERS)
360 dhcp_options.get(dhcp_packet.OPTION_CLASSLESS_STATIC_ROUTES)):
[all …]
Ddhcp_test_server.py57 from autotest_lib.client.cros import dhcp_packet
241 packet = dhcp_packet.DhcpPacket(byte_str=data)
/external/autotest/client/site_tests/network_DhcpNonAsciiParameter/
Dnetwork_DhcpNonAsciiParameter.py5 from autotest_lib.client.cros import dhcp_packet
33 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
34 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
35 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
36 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
37 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
38 dhcp_packet.OPTION_DOMAIN_NAME : domain_name,
39 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : dns_search_list
42 dhcp_packet.FIELD_LEGACY_SERVER_NAME : server_name
/external/autotest/client/site_tests/network_DhcpClasslessStaticRoute/
Dnetwork_DhcpClasslessStaticRoute.py5 from autotest_lib.client.cros import dhcp_packet
38 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
39 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
40 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
41 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
42 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
43 dhcp_packet.OPTION_DOMAIN_NAME : domain_name,
44 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : dns_search_list,
45 dhcp_packet.OPTION_CLASSLESS_STATIC_ROUTES : [
/external/autotest/client/site_tests/network_DhcpNegotiationSuccess/
Dnetwork_DhcpNegotiationSuccess.py5 from autotest_lib.client.cros import dhcp_packet
31 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
32 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
33 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
34 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
35 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
36 dhcp_packet.OPTION_DOMAIN_NAME : domain_name,
37 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : dns_search_list,
/external/autotest/client/site_tests/network_DhcpRequestHostName/
Dnetwork_DhcpRequestHostName.py9 from autotest_lib.client.cros import dhcp_packet
58 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
59 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
60 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
61 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
62 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
63 dhcp_packet.OPTION_DOMAIN_NAME : domain_name,
64 dhcp_packet.OPTION_HOST_NAME : TEST_HOSTNAME,
65 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : dns_search_list,
/external/autotest/client/site_tests/network_DhcpRenewWithOptionSubset/
Dnetwork_DhcpRenewWithOptionSubset.py7 from autotest_lib.client.cros import dhcp_packet
34 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
35 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
36 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
37 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
38 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
42 dhcp_packet.OPTION_DOMAIN_NAME : domain_name,
43 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : dns_search_list,
50 dhcp_packet.OPTION_DOMAIN_NAME : "mail.google.com",
/external/autotest/client/site_tests/network_DhcpRenew/
Dnetwork_DhcpRenew.py10 from autotest_lib.client.cros import dhcp_packet
47 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
48 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
49 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
50 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
51 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
52 dhcp_packet.OPTION_DOMAIN_NAME : domain_name,
53 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : dns_search_list,
54 dhcp_packet.OPTION_RENEWAL_T1_TIME_VALUE : LEASE_T1_TIME,
55 dhcp_packet.OPTION_REBINDING_T2_TIME_VALUE : LEASE_T2_TIME,
/external/autotest/client/site_tests/network_DhcpStaticIP/
Dnetwork_DhcpStaticIP.py7 from autotest_lib.client.cros import dhcp_packet
51 self._static_ip_options[dhcp_packet.OPTION_REQUESTED_IP] = (
56 self._static_ip_options[dhcp_packet.OPTION_DNS_SERVERS] = (
89 intended_ip = options[dhcp_packet.OPTION_REQUESTED_IP]
107 intended_ip = options[dhcp_packet.OPTION_REQUESTED_IP]
215 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
216 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
217 dhcp_packet.OPTION_IP_LEASE_TIME : self.LEASE_TIME_SECONDS,
218 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
219 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
[all …]
/external/autotest/client/site_tests/network_DhcpFQDN/
Dnetwork_DhcpFQDN.py8 from autotest_lib.client.cros import dhcp_packet
36 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
37 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
38 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
39 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
40 dhcp_packet.OPTION_FULLY_QUALIFIED_DOMAIN_NAME : fqdn_option
53 dhcp_packet.OPTION_FULLY_QUALIFIED_DOMAIN_NAME ]
/external/autotest/client/site_tests/network_DhcpVendorEncapsulatedOptions/
Dnetwork_DhcpVendorEncapsulatedOptions.py7 from autotest_lib.client.cros import dhcp_packet
69 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
70 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
71 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
72 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
73 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
74 dhcp_packet.OPTION_VENDOR_ENCAPSULATED_OPTIONS : vendor_options
88 dhcp_packet.OPTION_VENDOR_ENCAPSULATED_OPTIONS ]
/external/autotest/client/site_tests/network_DhcpWpadNegotiation/
Dnetwork_DhcpWpadNegotiation.py7 from autotest_lib.client.cros import dhcp_packet
60 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
61 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
62 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
63 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
64 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
65 dhcp_packet.OPTION_WEB_PROXY_AUTO_DISCOVERY : proxy_auto_config
/external/autotest/client/site_tests/network_DhcpMTU/
Dnetwork_DhcpMTU.py9 from autotest_lib.client.cros import dhcp_packet
64 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
65 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
66 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
67 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
68 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
69 dhcp_packet.OPTION_INTERFACE_MTU : interface_mtu
/external/autotest/client/site_tests/network_DhcpBrokenDefaultGateway/
Dnetwork_DhcpBrokenDefaultGateway.py8 from autotest_lib.client.cros import dhcp_packet
78 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
79 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
80 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
81 dhcp_packet.OPTION_REQUESTED_IP : intended_ip,
82 dhcp_packet.OPTION_DNS_SERVERS : dns_servers,
83 dhcp_packet.OPTION_ROUTERS : [ gateway_ip ],
/external/autotest/client/site_tests/network_DhcpNak/
Dnetwork_DhcpNak.py7 from autotest_lib.client.cros import dhcp_packet
39 dhcp_packet.OPTION_SERVER_ID : self.server_ip,
40 dhcp_packet.OPTION_SUBNET_MASK : subnet_mask,
41 dhcp_packet.OPTION_IP_LEASE_TIME : LEASE_TIME_SECONDS,
42 dhcp_packet.OPTION_REQUESTED_IP : self.intended_ip,
43 dhcp_packet.OPTION_DNS_SERVERS : [],
44 dhcp_packet.OPTION_DOMAIN_NAME : '',
45 dhcp_packet.OPTION_DNS_DOMAIN_SEARCH_LIST : [],
/external/dnsmasq/src/
Ddhcp.c82 daemon->dhcp_packet.iov_len = sizeof(struct dhcp_packet); in dhcp_init()
83 daemon->dhcp_packet.iov_base = safe_malloc(daemon->dhcp_packet.iov_len); in dhcp_init()
86 void dhcp_packet(time_t now) { in dhcp_packet() function
87 struct dhcp_packet* mess; in dhcp_packet()
111 msg.msg_iov = &daemon->dhcp_packet; in dhcp_packet()
125 if ((size_t) sz == daemon->dhcp_packet.iov_len) { in dhcp_packet()
126 if (!expand_buf(&daemon->dhcp_packet, sz + 100)) return; in dhcp_packet()
128 expand_buf(&daemon->dhcp_packet, sz); in dhcp_packet()
134 mess = (struct dhcp_packet*) daemon->dhcp_packet.iov_base; in dhcp_packet()
207 iov.iov_base = daemon->dhcp_packet.iov_base; in dhcp_packet()
[all …]
Drfc2131.c89 static void option_put(struct dhcp_packet* mess, unsigned char* end, int opt, int len,
91 static void option_put_string(struct dhcp_packet* mess, unsigned char* end, int opt, char* string,
98 static unsigned char* option_find(struct dhcp_packet* mess, size_t size, int opt_type, int minsize);
100 static size_t dhcp_packet_size(struct dhcp_packet* mess, struct dhcp_netid* netid,
102 static void clear_packet(struct dhcp_packet* mess, unsigned char* end);
103 static void do_options(struct dhcp_context* context, struct dhcp_packet* mess,
110 static void do_encap_opts(struct dhcp_opt* opts, int encap, int flag, struct dhcp_packet* mess,
112 static void pxe_misc(struct dhcp_packet* mess, unsigned char* end, unsigned char* uuid);
125 struct dhcp_packet* mess = (struct dhcp_packet*) daemon->dhcp_packet.iov_base; in dhcp_reply()
172 else if (size < sizeof(struct dhcp_packet)) in dhcp_reply()
[all …]
Ddnsmasq.h555 struct dhcp_packet { struct
640 struct iovec dhcp_packet; member
749 void dhcp_packet(time_t now);
Ddnsmasq.c556 if (daemon->dhcp && FD_ISSET(daemon->dhcpfd, &rset)) dhcp_packet(now); in main()