Network Component  Version 7.11.0
MDK Middleware for IPv4 and IPv6 Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NetDHCP: DHCP Client

Events generated by the Network - Dynamic Host Configuration Client functions. More...

Functions

__STATIC_INLINE void EvrNetDHCP_InitClient (uint8_t vcid, uint8_t option_flags)
 Event on DHCP client initialize (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_GetSocketFailed (void)
 Event on DHCP failed to allocate UDP socket (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_StartClient (void)
 Event on DHCP client start (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_StopClient (void)
 Event on DHCP client stop (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ClientState (uint8_t state)
 Event on DHCP indication of client state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_NextState (uint8_t state)
 Event on DHCP transition to next state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_StateRetransmit (uint8_t state)
 Event on DHCP retransmit in current state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ChangeStateOnTimeout (uint8_t current, uint8_t next)
 Event on DHCP state timeout and transit to next state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_AutoIpAddressProbe (const uint8_t *ip4_addr)
 Event on DHCP address probe for AutoIP mode (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_AutoIpSuccess (const uint8_t *ip4_addr)
 Event on DHCP assign AutoIP address success (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_T2Expired (uint8_t state)
 Event on DHCP timer T2 expired (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_LeaseExpired (uint8_t state)
 Event on DHCP address lease time expired (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_SendDhcpMessage (uint8_t msg_type, uint8_t broadcast)
 Event on DHCP send message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ReceiveFrame (const uint8_t *ip4_addr, uint32_t length)
 Event on DHCP receive frame (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongServerPort (uint16_t port, uint16_t port_valid)
 Event on DHCP wrong server UDP port (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on DHCP receive frame too short (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_MisformedReply (void)
 Event on DHCP receive misformed reply (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongTransactionId (uint32_t xid, uint32_t xid_valid)
 Event on DHCP receive wrong transaction identifier (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongClientHwAddress (const uint8_t *chaddr)
 Event on DHCP receive wrong Client Hardware Address (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongMagicCookie (uint32_t cookie, uint32_t cookie_valid)
 Event on DHCP receive wrong BOOTP Magic Cookie (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_InvalidMessageType (uint8_t msg_type, uint8_t msg_valid)
 Event on DHCP receive invalid message type (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowMessage (uint8_t msg_type)
 Event on DHCP display message type (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_FileOverloadOptions (uint8_t msg_type)
 Event on DHCP receive options overloaded to "File" field (Detail) More...
 
__STATIC_INLINE void EvrNetDHCP_SnameOverloadOptions (uint8_t msg_type)
 Event on DHCP receive options overloaded to "Sname" field (Detail) More...
 
__STATIC_INLINE void EvrNetDHCP_MissingServerId (uint8_t msg_type)
 Event on DHCP receive message with no Server ID (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ForwardedMessage (uint8_t msg_type)
 Event on DHCP receive forwarded message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_RelayAgentAddressInvalid (void)
 Event on DHCP receive message from invalid Relay Agent (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowRelayAgentAddress (const uint8_t *ip4_addr)
 Event on DHCP display relay agent IP address (Detail) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowOfferedAddress (const uint8_t *ip4_addr)
 Event on DHCP display offered IP address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ServerAddressNotSelected (const uint8_t *ip4_addr)
 Event on DHCP receive message from not selected server (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_AssignedAddrNotRequested (const uint8_t *ip4_addr)
 Event on DHCP receive wrong assigned IP address in DHCP_ACK (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowAssignedAddress (const uint8_t *ip4_addr)
 Event on DHCP display assigned IP address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowServerId (const uint8_t *ip4_addr)
 Event on DHCP display Server Identifier (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowNetMask (const uint8_t *net_mask)
 Event on DHCP display Network Mask (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowGatewayAddress (const uint8_t *ip4_addr)
 Event on DHCP display gateway IPv4 address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowDnsServers (const uint8_t *dns_list)
 Event on DHCP display DNS server addresses (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowLeaseTime (uint32_t lease_time)
 Event on DHCP display address lease time (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowTimeT1 (uint32_t t1_time)
 Event on DHCP display renewal time T1 (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowTimeT2 (uint32_t t2_time)
 Event on DHCP display rebinding time T2 (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowBootfileName (const uint8_t *bootfile, uint32_t length)
 Event on DHCP display Bootfile Name (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowNtpServerList (const uint8_t *ntp_list, uint32_t length)
 Event on DHCP display list of NTP server addresses (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_SetOptionInvalidParam (void)
 Event on DHCP set_option invalid parameter (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_SetOptionInvalidState (uint8_t state)
 Event on DHCP set_option invalid client state (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_SetOptionClientIdDefault (uint8_t type)
 Event on DHCP set_option with default Client-identifier (API) More...
 
__STATIC_INLINE void EvrNetDHCP_SetOptionClientId (uint8_t type, uint32_t length)
 Event on DHCP set_option with user Client-identifier (API) More...
 
__STATIC_INLINE void EvrNetDHCP_UninitClient (void)
 Event on DHCP client de-initialize (Op) More...
 

Description

Events generated by the Network - Dynamic Host Configuration Client functions.

The Network DHCP Client functions generate events that report events in the Dynamic Host Configuration Protocol client and help in troubleshooting.

Function Documentation

__STATIC_INLINE void EvrNetDHCP_AssignedAddrNotRequested ( const uint8_t *  ip4_addr)

Event on DHCP receive wrong assigned IP address in DHCP_ACK (Op)

Parameters
ip4_addrpointer to IPv4 address

The event AssignedAddrNotRequested is created when the network library receives a DHCP_ACK message, but the assigned IP address is not identical to the offered IP address. The frame is therefore discarded.

Value in the Event Recorder shows:

  • server: assigned IP address.
__STATIC_INLINE void EvrNetDHCP_AutoIpAddressProbe ( const uint8_t *  ip4_addr)

Event on DHCP address probe for AutoIP mode (Op)

Parameters
ip4_addrpointer to IP address

The event AutoIpAddressProbe is created when the network library wants to test the selected automatic IP address if the address is already in use.

Value in the Event Recorder shows:

  • ip: IP address to test.
__STATIC_INLINE void EvrNetDHCP_AutoIpSuccess ( const uint8_t *  ip4_addr)

Event on DHCP assign AutoIP address success (Op)

Parameters
ip4_addrpointer to assigned AutoIP address

The event AutoIpSuccess is created when the network library assigns an automated IP address to an ethernet interface.

Value in the Event Recorder shows:

  • ip: assigned automatic IP address.
__STATIC_INLINE void EvrNetDHCP_ChangeStateOnTimeout ( uint8_t  current,
uint8_t  next 
)

Event on DHCP state timeout and transit to next state (Op)

Parameters
currentcurrent state
nextnext state

The event ChangeStateOnTimeout is created when the timeout expired and the DHCP client needs to change the state.

Value in the Event Recorder shows:

  • state: current state of the DHCP client.
  • next: next state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_ClientState ( uint8_t  state)

Event on DHCP indication of client state (Op)

Parameters
statecurrent state

The event ClientState is created when the network library displays the current state of the DHCP client.

Value in the Event Recorder shows:

  • state: current state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_FileOverloadOptions ( uint8_t  msg_type)

Event on DHCP receive options overloaded to "File" field (Detail)

Parameters
msg_typemessage type

The event FileOverloadOptions is created when the network library receives the DHCP response frame, and the DHCP options are returned in the "Boot file name" section of the BOOTP header. The size of the field "file" is 128 bytes.

Value in the Event Recorder shows:

  • type: received DHCP message type.
__STATIC_INLINE void EvrNetDHCP_ForwardedMessage ( uint8_t  msg_type)

Event on DHCP receive forwarded message (Op)

Parameters
msg_typereceived message type

The event ForwardedMessage is created when the network library checks the IP address of the sender and detects that the DHCP message was transmitted via a relay agent.

Value in the Event Recorder shows:

  • type: received DHCP message type (DHCP_OFFER).
__STATIC_INLINE void EvrNetDHCP_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on DHCP receive frame too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame

The event FrameTooShort is created when the network library receives the DHCP response frame that is too short. The frame is therefore discarded.

Value in the Event Recorder shows:

  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.
__STATIC_INLINE void EvrNetDHCP_GetSocketFailed ( void  )

Event on DHCP failed to allocate UDP socket (Error)

The event GetSocketFailed is created when the DHCP client service is initialized, that is, when the function netInitialize is executed, and the service could not assign the UDP socket.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetDHCP_InitClient ( uint8_t  vcid,
uint8_t  option_flags 
)

Event on DHCP client initialize (Op)

Parameters
vcidVendor Class Identifier option flag
  • 0: not enabled
  • >0: enabled
option_flagsDHCP client option flags
  • 0x01: Opt.67 Bootfile name
  • 0x02: Opt.42 NTP servers

The event InitClient is created when the DHCP client service is initialized, that is, when the function netInitialize is executed.

Value in the Event Recorder shows:

  • vcid: length of the Vendor Class Identifier (0= VCID disabled).
  • opt: option flags (1= BOOTFILE, 2= NTP_SERVERS).
__STATIC_INLINE void EvrNetDHCP_InvalidMessageType ( uint8_t  msg_type,
uint8_t  msg_valid 
)

Event on DHCP receive invalid message type (Op)

Parameters
msg_typereceived message type
msg_validvalid message type

The event InvalidMessageType is created when the network library receives the DHCP frame, but the type of message is not valid in current state. The DHCP frame is therefore discarded.

Value in the Event Recorder shows:

  • type: received DHCP message type.
  • valid: expected DHCP message type.
__STATIC_INLINE void EvrNetDHCP_LeaseExpired ( uint8_t  state)

Event on DHCP address lease time expired (Error)

Parameters
statecurrent state

The event LeaseExpired is created when the assigned IP address is no longer valid and the system must stop using it. The network library reinitializes the DHCP client process to obtain a new IP address.

Value in the Event Recorder shows:

  • state: current state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_MisformedReply ( void  )

Event on DHCP receive misformed reply (Error)

The event MisformedReply is created when the network library receives the DHCP response frame, checks the BOOTP header and finds errors in it. The frame is therefore discarded.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetDHCP_MissingServerId ( uint8_t  msg_type)

Event on DHCP receive message with no Server ID (Op)

Parameters
msg_typereceived message type

The event MissingServerId is created when the network library receives the DHCP message, but the mandatory server ID is missing. The frame is therefore discarded.

Value in the Event Recorder shows:

  • type: received DHCP message type (DHCP_OFFER).
__STATIC_INLINE void EvrNetDHCP_NextState ( uint8_t  state)

Event on DHCP transition to next state (Op)

Parameters
statenext state

The event NextState is created when the network library displays the next state in which the DHCP client will transit.

Value in the Event Recorder shows:

  • next: next state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_ReceiveFrame ( const uint8_t *  ip4_addr,
uint32_t  length 
)

Event on DHCP receive frame (Op)

Parameters
ip4_addrpointer to IPv4 address of the server
lengthframe length in bytes

The event ReceiveFrame is created when the network library receives the DHCP frame.

Value in the Event Recorder shows:

  • server: IP address of a DHCP server.
  • len: length of the received frame in bytes.
__STATIC_INLINE void EvrNetDHCP_RelayAgentAddressInvalid ( void  )

Event on DHCP receive message from invalid Relay Agent (Error)

The event RelayAgentAddressInvalid is created when the network library checks the IP address of the relay agent and finds it invalid. The frame is therefore discarded.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetDHCP_SendDhcpMessage ( uint8_t  msg_type,
uint8_t  broadcast 
)

Event on DHCP send message (Op)

Parameters
msg_typemessage type
broadcastbroadcast the message
  • 0: no
  • 1: yes

The event SendDhcpMessage is created when a network library sends a DHCP message.

Value in the Event Recorder shows:

  • type: type of DHCP message (REQUEST, DISCOVER).
  • bcast: message is broadcast (1= yes, 0= no)
__STATIC_INLINE void EvrNetDHCP_ServerAddressNotSelected ( const uint8_t *  ip4_addr)

Event on DHCP receive message from not selected server (Op)

Parameters
ip4_addrpointer to IPv4 address

The event ServerAddressNotSelected is created when the network library receives a DHCP message from a different DHCP server that is not selected. The network library selects one DHCP server if multiple servers respond to the DHCP_DISCOVER message in the SELECTING state. Therefore, the frame from the non-selected server is discarded.

Value in the Event Recorder shows:

  • server: IP address of the server that sends the message.
__STATIC_INLINE void EvrNetDHCP_SetOptionClientId ( uint8_t  type,
uint32_t  length 
)

Event on DHCP set_option with user Client-identifier (API)

Parameters
typehardware type
  • 0: Generic,
  • 1: Ethernet,
  • 255: IANA.
lengthlength of DHCP option including hardware type

The event SetOptionClientId is created if the netDHCP_SetOption function is executed and the DHCP client identifier is set to a new value.

Value in the Event Recorder shows:

  • type: client identifier type to used by the DHCP client.
  • len: length of the client identifier option.
__STATIC_INLINE void EvrNetDHCP_SetOptionClientIdDefault ( uint8_t  type)

Event on DHCP set_option with default Client-identifier (API)

Parameters
typehardware type
  • 0: Generic,
  • 1: Ethernet,
  • 255: IANA.
Remarks
Default DHCP Client-identifier is ethernet MAC address.

The event SetOptionClientIdDefault is created if the netDHCP_SetOption function is executed but the custom client identifier option is not provided. Therefore, the network library starts using the default client identifier.

Value in the Event Recorder shows:

  • type: client identifier type to used by the DHCP client.
__STATIC_INLINE void EvrNetDHCP_SetOptionInvalidParam ( void  )

Event on DHCP set_option invalid parameter (Error)

The event SetOptionInvalidParam is created, when the netDHCP_SetOption function is given an invalid parameter.

Value in the Event Recorder shows:

  • error
__STATIC_INLINE void EvrNetDHCP_SetOptionInvalidState ( uint8_t  state)

Event on DHCP set_option invalid client state (Error)

Parameters
stateDHCP client state

The event SetOptionInvalidState is created if the netDHCP_SetOption function is executed when the DHCP client process is active. First, you need to disable the DHCP client with netDHCP_Disable.

Value in the Event Recorder shows:

  • state: current state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_ShowAssignedAddress ( const uint8_t *  ip4_addr)

Event on DHCP display assigned IP address (Op)

Parameters
ip4_addrpointer to IPv4 address

The event ShowAssignedAddress is created when the network library wants to display the assigned IP address.

Value in the Event Recorder shows:

  • ip: assigned IP address.
__STATIC_INLINE void EvrNetDHCP_ShowBootfileName ( const uint8_t *  bootfile,
uint32_t  length 
)

Event on DHCP display Bootfile Name (Op)

Parameters
bootfilebootfile name string
lengthlength of the bootfile name string

The event ShowBootfileName is created when the network library wants to display the name of the boot file that was requested in DHCP options.

Value in the Event Recorder shows:

  • bootfile: name of the boot file.
__STATIC_INLINE void EvrNetDHCP_ShowDnsServers ( const uint8_t *  dns_list)

Event on DHCP display DNS server addresses (Op)

Parameters
dns_listpointer to DNS server address list
Remarks
Displays primary and secondary DNS server address.

The event ShowDnsServers is created when the network library wants to display the IP addresses of the primary and secondary DNS server.

Value in the Event Recorder shows:

  • pri: IP address of the primary DNS server.
  • sec: IP address of the secondary DNS server.
__STATIC_INLINE void EvrNetDHCP_ShowGatewayAddress ( const uint8_t *  ip4_addr)

Event on DHCP display gateway IPv4 address (Op)

Parameters
ip4_addrpointer to IPv4 address

The event ShowGatewayAddress is created when the network library wants to display the IP address of a gateway.

Value in the Event Recorder shows:

  • gw: IP address of a gateway.
__STATIC_INLINE void EvrNetDHCP_ShowLeaseTime ( uint32_t  lease_time)

Event on DHCP display address lease time (Op)

Parameters
lease_timelease time in seconds

The event ShowLeaseTime is created when the network library wants to display the lease time for the assigned IP address.

Value in the Event Recorder shows:

  • time: lease time in seconds.
__STATIC_INLINE void EvrNetDHCP_ShowMessage ( uint8_t  msg_type)

Event on DHCP display message type (Op)

Parameters
msg_typemessage type

The event ShowMessage is created when the network library receives the DHCP message.

Value in the Event Recorder shows:

  • type: received DHCP message type.
__STATIC_INLINE void EvrNetDHCP_ShowNetMask ( const uint8_t *  net_mask)

Event on DHCP display Network Mask (Op)

Parameters
net_maskpointer to network mask

The event ShowNetMask is created when the network library wants to display the network mask.

Value in the Event Recorder shows:

  • mask: network mask.
__STATIC_INLINE void EvrNetDHCP_ShowNtpServerList ( const uint8_t *  ntp_list,
uint32_t  length 
)

Event on DHCP display list of NTP server addresses (Op)

Parameters
ntp_listpointer to an array of NTP server IP addresses
lengthlength of an array in bytes

The event ShowNtpServerList is created when the network library wants to display the NTP servers required in the DHCP options.

Value in the Event Recorder shows:

  • ntp: IP address of the first NTP server.
__STATIC_INLINE void EvrNetDHCP_ShowOfferedAddress ( const uint8_t *  ip4_addr)

Event on DHCP display offered IP address (Op)

Parameters
ip4_addrpointer to IPv4 address

The event ShowOfferedAddress is created when the network library wants to display the IP address offered by the DHCP server.

Value in the Event Recorder shows:

  • ip: offered IP address.
__STATIC_INLINE void EvrNetDHCP_ShowRelayAgentAddress ( const uint8_t *  ip4_addr)

Event on DHCP display relay agent IP address (Detail)

Parameters
ip4_addrpointer to IPv4 address

The event ShowRelayAgentAddress is created when the network library wants to display the IP address of the relay agent, when DHCP messages are forwarded from another network.

Value in the Event Recorder shows:

  • relay: IP address of the relay agent.
__STATIC_INLINE void EvrNetDHCP_ShowServerId ( const uint8_t *  ip4_addr)

Event on DHCP display Server Identifier (Op)

Parameters
ip4_addrpointer to IPv4 address

The event ShowServerId is created when the network library wants to display the server identifier received in the SELECTING state. The server ID is in fact the IP address of the DHCP server.

Value in the Event Recorder shows:

  • server_id: DHCP server identifier.
__STATIC_INLINE void EvrNetDHCP_ShowTimeT1 ( uint32_t  t1_time)

Event on DHCP display renewal time T1 (Op)

Parameters
t1_timet1 time in seconds

The event ShowTimeT1 is created when the network library wants to display the lease renewal time for the assigned IP address.

Value in the Event Recorder shows:

  • t1: lease renewal time in seconds.
__STATIC_INLINE void EvrNetDHCP_ShowTimeT2 ( uint32_t  t2_time)

Event on DHCP display rebinding time T2 (Op)

Parameters
t2_timet2 time in seconds

The event ShowTimeT2 is created when the network library wants to display the lease rebinding time for the assigned IP address.

Value in the Event Recorder shows:

  • t1: lease rebinding time in seconds.
__STATIC_INLINE void EvrNetDHCP_SnameOverloadOptions ( uint8_t  msg_type)

Event on DHCP receive options overloaded to "Sname" field (Detail)

Parameters
msg_typemessage type

The event SnameOverloadOptions is created when the network library receives the DHCP response frame, and the DHCP options are returned in the "Server host name" section of the BOOTP header. The size of the field "sname" is 64 bytes.

Value in the Event Recorder shows:

  • type: received DHCP message type.
__STATIC_INLINE void EvrNetDHCP_StartClient ( void  )

Event on DHCP client start (Op)

The event StartClient is created when the DHCP client service is started. This happens when the functions netInitialize or netDHCP_Enable are executed.

Value in the Event Recorder shows:

  • start
__STATIC_INLINE void EvrNetDHCP_StateRetransmit ( uint8_t  state)

Event on DHCP retransmit in current state (Op)

Parameters
statecurrent state

The event StateRetransmit is created when the network library wants to resend the DHCP message. This happens if the DHCP server does not respond to client request.

Value in the Event Recorder shows:

  • state: current state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_StopClient ( void  )

Event on DHCP client stop (Op)

The event StopClient is created when the DHCP client service is stopped, that is when the function netDHCP_Disable is executed.

Value in the Event Recorder shows:

  • stop
__STATIC_INLINE void EvrNetDHCP_T2Expired ( uint8_t  state)

Event on DHCP timer T2 expired (Op)

Parameters
statecurrent state

The event T2Expired is created when the lease time of the assigned IP address has expired and the lease must be renewed. The network library starts renewing the assigned IP address.

Value in the Event Recorder shows:

  • state: current state of the DHCP client.
__STATIC_INLINE void EvrNetDHCP_UninitClient ( void  )

Event on DHCP client de-initialize (Op)

The event UninitClient is created when the function netUninitialize is executed.

Value in the Event Recorder shows:

  • dhcp
__STATIC_INLINE void EvrNetDHCP_WrongClientHwAddress ( const uint8_t *  chaddr)

Event on DHCP receive wrong Client Hardware Address (Error)

Parameters
chaddrpointer to received chaddr address (MAC)

The event WrongClientHwAddress is created when the network library receives the DHCP response frame, but the received client hardware address in the BOOTP header is not the same as our MAC address. The frame is therefore discarded.

Value in the Event Recorder shows:

  • chaddr: received client hardware address value.
__STATIC_INLINE void EvrNetDHCP_WrongMagicCookie ( uint32_t  cookie,
uint32_t  cookie_valid 
)

Event on DHCP receive wrong BOOTP Magic Cookie (Error)

Parameters
cookiereceived magic cookie
cookie_validvalid magic cookie

The event WrongMagicCookie is created when the network library receives the DHCP response frame, but the received BOOTP magic cookie is not valid. The frame is therefore discarded.

Value in the Event Recorder shows:

  • cookie: received BOOTP magic cookie.
  • valid: expected BOOTP magic cookie.
__STATIC_INLINE void EvrNetDHCP_WrongServerPort ( uint16_t  port,
uint16_t  port_valid 
)

Event on DHCP wrong server UDP port (Error)

Parameters
portreceived server port number
port_validvalid server port number

The event WrongPort is created when the network library receives the DHCP response frame, and the UDP server port is not a standard DHCP server port. The frame is therefore discarded.

Value in the Event Recorder shows:

  • port: received server UDP port.
  • valid: expected server UDP port.
__STATIC_INLINE void EvrNetDHCP_WrongTransactionId ( uint32_t  xid,
uint32_t  xid_valid 
)

Event on DHCP receive wrong transaction identifier (Error)

Parameters
xidreceived transaction identifier
xid_validvalid transaction identifier

The event WrongTransactionId is created when the network library receives the DHCP response frame, but the received transaction identifier (XID) is not identical to the transaction identifier of our DHCP request. The frame is therefore discarded.

Value in the Event Recorder shows:

  • xid: received transaction identifier.
  • valid: expected transaction identifier.