52 unsigned int encapsulator ) {
110 void *
data,
size_t max_len ) {
118 DBG (
"Could not create DHCPDISCOVER: %s\n",
137 void *
data,
size_t max_len ) {
144 data, max_len ) ) != 0 ) {
154 DBG (
"Could not set DHCPACK global settings: %s\n",
160 DBG (
"Could not set DHCPACK netdev settings: %s\n",
179 void *
data,
size_t max_len ) {
188 if ( ( ! proxy_settings ) && ( ! pxebs_settings ) ) {
196 data, max_len ) ) != 0 ) {
197 DBG (
"Could not create PXE BS ACK: %s\n",
207 if ( proxy_settings &&
209 DBG (
"Could not copy ProxyDHCP settings: %s\n",
215 if ( pxebs_settings &&
217 DBG (
"Could not copy PXE BS settings: %s\n",
struct arbelprm_rc_send_wqe rc
#define DHCP_EB_ENCAP
Etherboot-specific encapsulated options.
int fetch_raw_setting_copy(struct settings *settings, const struct setting *setting, void **data)
Fetch value of setting.
int fetch_ipv4_setting(struct settings *settings, const struct setting *setting, struct in_addr *inp)
Fetch value of IPv4 address setting.
int create_fakedhcpack(struct net_device *netdev, void *data, size_t max_len)
Create fake DHCPACK packet.
int dhcp_create_request(struct dhcp_packet *dhcppkt, struct net_device *netdev, unsigned int msgtype, uint32_t xid, struct in_addr ciaddr, void *data, size_t max_len)
Create DHCP request packet.
static int copy_settings(struct dhcp_packet *dest, struct settings *source)
Copy settings to DHCP packet.
#define DHCP_MAX_OPTION
Maximum normal DHCP option.
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
int create_fakedhcpdiscover(struct net_device *netdev, void *data, size_t max_len)
Create fake DHCPDISCOVER packet.
#define DHCP_MIN_OPTION
Minimum normal DHCP option.
int dhcp_create_packet(struct dhcp_packet *dhcppkt, struct net_device *netdev, uint8_t msgtype, uint32_t xid, const void *options, size_t options_len, void *data, size_t max_len)
Create a DHCP packet.
static int copy_encap_settings(struct dhcp_packet *dest, struct settings *source, unsigned int encapsulator)
Copy settings to DHCP packet.
uint64_t tag
Setting tag, if applicable.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define PROXYDHCP_SETTINGS_NAME
Settings block name used for ProxyDHCP responses.
static struct net_device * netdev
struct in_addr ciaddr
"Client" IP address
#define PXEBS_SETTINGS_NAME
Setting block name used for BootServerDHCP responses.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
int dhcppkt_store(struct dhcp_packet *dhcppkt, unsigned int tag, const void *data, size_t len)
Store value of DHCP packet setting.
Network device management.
uint32_t dhcp_last_xid
Most recent DHCP transaction ID.
struct dhcphdr * dhcphdr
The DHCP packet contents.
struct settings * find_settings(const char *name)
Find settings block.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
uint8_t data[48]
Additional event data.
#define DHCP_VENDOR_ENCAP
Vendor encapsulated options.
#define DHCP_ENCAP_OPT(encapsulator, encapsulated)
Construct a tag value for an encapsulated option.
#define DBG(...)
Print a debugging message.
uint64_t tag
Identity tag.
#define NULL
NULL pointer (VOID *)
int create_fakepxebsack(struct net_device *netdev, void *data, size_t max_len)
Create fake PXE Boot Server ACK packet.