Lines Matching refs:dhcppkt
179 struct dhcp_packet *dhcppkt,
190 struct dhcp_packet *dhcppkt,
374 struct dhcp_packet *dhcppkt __unused, in dhcp_discovery_tx()
396 struct dhcp_packet *dhcppkt, in dhcp_rx_offer() argument
414 if ( dhcppkt->dhcphdr->yiaddr.s_addr ) in dhcp_rx_offer()
415 DBGC ( dhcp, " for %s", inet_ntoa ( dhcppkt->dhcphdr->yiaddr )); in dhcp_rx_offer()
434 offer->ip = dhcppkt->dhcphdr->yiaddr; in dhcp_rx_offer()
437 vci_len = dhcppkt_fetch ( dhcppkt, DHCP_VENDOR_CLASS_ID, in dhcp_rx_offer()
443 pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_PXE_BOOT_MENU, NULL, 0 ); in dhcp_rx_offer()
452 offer->pxe = dhcppkt_get ( dhcppkt ); in dhcp_rx_offer()
456 dhcppkt_fetch ( dhcppkt, DHCP_EB_PRIORITY, &offer->priority, in dhcp_rx_offer()
462 dhcppkt_fetch ( dhcppkt, DHCP_EB_NO_PXEDHCP, &offer->no_pxedhcp, in dhcp_rx_offer()
488 struct dhcp_packet *dhcppkt, in dhcp_discovery_rx() argument
494 dhcp_rx_offer ( dhcp, dhcppkt, peer, msgtype, server_id ); in dhcp_discovery_rx()
557 struct dhcp_packet *dhcppkt, in dhcp_request_tx() argument
569 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_SERVER_IDENTIFIER, in dhcp_request_tx()
575 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_REQUESTED_ADDRESS, in dhcp_request_tx()
596 struct dhcp_packet *dhcppkt, in dhcp_request_rx() argument
605 dhcp_rx_offer ( dhcp, dhcppkt, peer, msgtype, server_id ); in dhcp_request_rx()
622 ip = dhcppkt->dhcphdr->yiaddr; in dhcp_request_rx()
640 if ( ( rc = register_settings ( &dhcppkt->settings, parent ) ) != 0 ){ in dhcp_request_rx()
703 struct dhcp_packet *dhcppkt, in dhcp_proxy_tx() argument
714 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_SERVER_IDENTIFIER, in dhcp_proxy_tx()
736 struct dhcp_packet *dhcppkt, in dhcp_proxy_rx() argument
744 dhcp_rx_offer ( dhcp, dhcppkt, peer, msgtype, server_id ); in dhcp_proxy_rx()
765 dhcppkt->settings.name = PROXYDHCP_SETTINGS_NAME; in dhcp_proxy_rx()
766 if ( ( rc = register_settings ( &dhcppkt->settings, NULL ) ) != 0 ) { in dhcp_proxy_rx()
835 struct dhcp_packet *dhcppkt, in dhcp_pxebs_tx() argument
851 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_PXE_BOOT_MENU_ITEM, in dhcp_pxebs_tx()
894 struct dhcp_packet *dhcppkt, in dhcp_pxebs_rx() argument
907 dhcppkt_fetch ( dhcppkt, DHCP_PXE_BOOT_MENU_ITEM, in dhcp_pxebs_rx()
926 dhcppkt->settings.name = PXEBS_SETTINGS_NAME; in dhcp_pxebs_rx()
927 if ( ( rc = register_settings ( &dhcppkt->settings, NULL ) ) != 0 ) { in dhcp_pxebs_rx()
1035 int dhcp_create_packet ( struct dhcp_packet *dhcppkt, in dhcp_create_packet() argument
1058 memset ( dhcppkt, 0, sizeof ( *dhcppkt ) ); in dhcp_create_packet()
1059 dhcppkt_init ( dhcppkt, data, max_len ); in dhcp_create_packet()
1062 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_MESSAGE_TYPE, in dhcp_create_packet()
1083 int dhcp_create_request ( struct dhcp_packet *dhcppkt, in dhcp_create_request() argument
1096 if ( ( rc = dhcp_create_packet ( dhcppkt, netdev, msgtype, in dhcp_create_request()
1106 dhcppkt->dhcphdr->ciaddr = ciaddr; in dhcp_create_request()
1111 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_EB_ENCAP, dhcp_features, in dhcp_create_request()
1121 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_EB_BUS_ID, &dhcp_desc, in dhcp_create_request()
1135 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_ID, &client_id, in dhcp_create_request()
1146 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_UUID, in dhcp_create_request()
1160 if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_USER_CLASS_ID, in dhcp_create_request()
1195 struct dhcp_packet dhcppkt; in dhcp_tx() local
1209 if ( ( rc = dhcp_create_request ( &dhcppkt, dhcp->netdev, msgtype, in dhcp_tx()
1218 if ( ( rc = dhcp->state->tx ( dhcp, &dhcppkt, &peer ) ) != 0 ) { in dhcp_tx()
1225 iob_put ( iobuf, dhcppkt.len ); in dhcp_tx()
1253 struct dhcp_packet *dhcppkt; in dhcp_deliver_iob() local
1274 dhcppkt = zalloc ( sizeof ( *dhcppkt ) + data_len ); in dhcp_deliver_iob()
1275 if ( ! dhcppkt ) { in dhcp_deliver_iob()
1279 dhcphdr = ( ( ( void * ) dhcppkt ) + sizeof ( *dhcppkt ) ); in dhcp_deliver_iob()
1281 dhcppkt_init ( dhcppkt, dhcphdr, data_len ); in dhcp_deliver_iob()
1284 dhcppkt_fetch ( dhcppkt, DHCP_MESSAGE_TYPE, &msgtype, in dhcp_deliver_iob()
1288 dhcppkt_fetch ( dhcppkt, DHCP_SERVER_IDENTIFIER, in dhcp_deliver_iob()
1302 dhcp->state->rx ( dhcp, dhcppkt, peer, msgtype, server_id ); in dhcp_deliver_iob()
1305 dhcppkt_put ( dhcppkt ); in dhcp_deliver_iob()