Network Component  
MDK Middleware for IPv4 and IPv6 Networking
 
Loading...
Searching...
No Matches
NetDHCP: DHCP Client

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

Functions

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

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

◆ EvrNetDHCP_AssignedAddrNotRequested()

__STATIC_INLINE void EvrNetDHCP_AssignedAddrNotRequested ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • server: assigned IP address.

◆ EvrNetDHCP_AutoIpAddressProbe()

__STATIC_INLINE void EvrNetDHCP_AutoIpAddressProbe ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP address probe for AutoIP mode (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • ip: IP address to test.

◆ EvrNetDHCP_AutoIpSuccess()

__STATIC_INLINE void EvrNetDHCP_AutoIpSuccess ( uint16_t  if_id,
const uint8_t *  auto_lm 
)

Event on DHCP assign AutoIP address success (Op)

Parameters
if_idnetwork interface identifier
auto_lmpointer to assigned AutoIP address and network mask

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • ip: assigned automatic IP address.
  • mask: assigned network mask.

◆ EvrNetDHCP_ChangeStateOnTimeout()

__STATIC_INLINE void EvrNetDHCP_ChangeStateOnTimeout ( uint16_t  if_id,
uint8_t  current,
uint8_t  next 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • state: current state of the DHCP client.
  • next: next state of the DHCP client.

◆ EvrNetDHCP_ClientState()

__STATIC_INLINE void EvrNetDHCP_ClientState ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP indication of client state (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • state: current state of the DHCP client.

◆ EvrNetDHCP_FileOverloadOptions()

__STATIC_INLINE void EvrNetDHCP_FileOverloadOptions ( uint16_t  if_id,
uint8_t  msg_type 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: received DHCP message type.

◆ EvrNetDHCP_ForwardedMessage()

__STATIC_INLINE void EvrNetDHCP_ForwardedMessage ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP receive forwarded message (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: received DHCP message type (DHCP_OFFER).

◆ EvrNetDHCP_FrameTooShort()

__STATIC_INLINE void EvrNetDHCP_FrameTooShort ( uint16_t  if_id,
uint32_t  length,
uint32_t  min_length 
)

Event on DHCP receive frame too short (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.

◆ EvrNetDHCP_GetSocketFailed()

__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. To resolve this error, you must increase the number of available UDP sockets in the UDP socket configuration.

Value in the Event Recorder shows:

  • error

◆ EvrNetDHCP_InitClient()

__STATIC_INLINE void EvrNetDHCP_InitClient ( uint16_t  if_id,
uint8_t  bootfile,
uint8_t  ntp_servers,
uint8_t  vcid 
)

Event on DHCP client initialize (Op)

Parameters
if_idnetwork interface identifier
bootfileBootfile name option enabled
ntp_serversNTP servers list option enabled
vcidVendor Class Identifier option enabled

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:

  • netif: network interface identifier.
  • opt: extended DHCP options enabled.

◆ EvrNetDHCP_InvalidMessageType()

__STATIC_INLINE void EvrNetDHCP_InvalidMessageType ( uint16_t  if_id,
uint8_t  msg_type,
uint8_t  msg_valid 
)

Event on DHCP receive invalid message type (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: received DHCP message type.
  • valid: expected DHCP message type.

◆ EvrNetDHCP_LeaseExpired()

__STATIC_INLINE void EvrNetDHCP_LeaseExpired ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP address lease time expired (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • state: current state of the DHCP client.

◆ EvrNetDHCP_MisformedReply()

__STATIC_INLINE void EvrNetDHCP_MisformedReply ( uint16_t  if_id)

Event on DHCP receive misformed reply (Error)

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetDHCP_MissingServerId()

__STATIC_INLINE void EvrNetDHCP_MissingServerId ( uint16_t  if_id,
uint8_t  msg_type 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: received DHCP message type (DHCP_OFFER).

◆ EvrNetDHCP_NextState()

__STATIC_INLINE void EvrNetDHCP_NextState ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP transition to next state (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • next: next state of the DHCP client.

◆ EvrNetDHCP_OfferedAddressInvalid()

__STATIC_INLINE void EvrNetDHCP_OfferedAddressInvalid ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP receive message offering an invalid IP address (Error)

Parameters
if_idnetwork interface identifier
ip4_addrpointer to IPv4 address

The event OfferedAddressInvalid is created when the network library checks the offered IP address and finds it invalid. The frame is therefore discarded. This usually happens in network attacks.

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • ip: offered IP address.

◆ EvrNetDHCP_ReceiveFrame()

__STATIC_INLINE void EvrNetDHCP_ReceiveFrame ( uint16_t  if_id,
const uint8_t *  ip4_addr,
uint32_t  length 
)

Event on DHCP receive frame (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • server: IP address of a DHCP server.
  • len: length of the received frame in bytes.

◆ EvrNetDHCP_SendDhcpMessage()

__STATIC_INLINE void EvrNetDHCP_SendDhcpMessage ( uint16_t  if_id,
uint8_t  msg_type,
uint8_t  broadcast 
)

Event on DHCP send message (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: type of DHCP message (REQUEST, DISCOVER).
  • bcast: message is broadcast (1= yes, 0= no)

◆ EvrNetDHCP_ServerAddressNotSelected()

__STATIC_INLINE void EvrNetDHCP_ServerAddressNotSelected ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • server: IP address of the server that sends the message.

◆ EvrNetDHCP_SetOptionClientId()

__STATIC_INLINE void EvrNetDHCP_SetOptionClientId ( uint16_t  if_id,
uint8_t  type,
uint32_t  length 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: client identifier type to used by the DHCP client.
  • len: length of the client identifier option.

◆ EvrNetDHCP_SetOptionClientIdDefault()

__STATIC_INLINE void EvrNetDHCP_SetOptionClientIdDefault ( uint16_t  if_id,
uint8_t  type 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: client identifier type to used by the DHCP client.

◆ EvrNetDHCP_SetOptionInvalidParam()

__STATIC_INLINE void EvrNetDHCP_SetOptionInvalidParam ( uint16_t  if_id)

Event on DHCP set_option invalid parameter (Error)

Parameters
if_idnetwork interface identifier

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

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetDHCP_SetOptionInvalidState()

__STATIC_INLINE void EvrNetDHCP_SetOptionInvalidState ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP set_option invalid client state (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • state: current state of the DHCP client.

◆ EvrNetDHCP_SnameOverloadOptions()

__STATIC_INLINE void EvrNetDHCP_SnameOverloadOptions ( uint16_t  if_id,
uint8_t  msg_type 
)

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

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • type: received DHCP message type.

◆ EvrNetDHCP_StartClient()

__STATIC_INLINE void EvrNetDHCP_StartClient ( uint16_t  if_id)

Event on DHCP client start (Op)

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetDHCP_StateRetransmit()

__STATIC_INLINE void EvrNetDHCP_StateRetransmit ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP retransmit in current state (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • state: current state of the DHCP client.

◆ EvrNetDHCP_StopClient()

__STATIC_INLINE void EvrNetDHCP_StopClient ( uint16_t  if_id)

Event on DHCP client stop (Op)

Parameters
if_idnetwork interface identifier

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:

  • netif: network interface identifier.

◆ EvrNetDHCP_T2Expired()

__STATIC_INLINE void EvrNetDHCP_T2Expired ( uint16_t  if_id,
uint8_t  state 
)

Event on DHCP timer T2 expired (Op)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • state: current state of the DHCP client.

◆ EvrNetDHCP_UninitClient()

__STATIC_INLINE void EvrNetDHCP_UninitClient ( uint16_t  if_id)

Event on DHCP client de-initialize (Op)

Parameters
if_idnetwork interface identifier

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

Value in the Event Recorder shows:

  • netif: network interface identifier.

◆ EvrNetDHCP_ViewAssignedAddress()

__STATIC_INLINE void EvrNetDHCP_ViewAssignedAddress ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP display assigned IP address (Op)

Parameters
if_idnetwork interface identifier
ip4_addrpointer to IPv4 address

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • ip: assigned IP address.

◆ EvrNetDHCP_ViewBootfileName()

__STATIC_INLINE void EvrNetDHCP_ViewBootfileName ( 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 ViewBootfileName 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.

◆ EvrNetDHCP_ViewDnsServers()

__STATIC_INLINE void EvrNetDHCP_ViewDnsServers ( uint16_t  if_id,
const uint8_t *  dns_list 
)

Event on DHCP display DNS server addresses (Op)

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

The event ViewDnsServers 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:

  • netif: network interface identifier.
  • pri_dns: IP address of the primary DNS server.
  • sec_dns: IP address of the secondary DNS server.

◆ EvrNetDHCP_ViewGatewayAddress()

__STATIC_INLINE void EvrNetDHCP_ViewGatewayAddress ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP display gateway IPv4 address (Op)

Parameters
if_idnetwork interface identifier
ip4_addrpointer to IPv4 address

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • gw: IP address of a gateway.

◆ EvrNetDHCP_ViewLeaseTime()

__STATIC_INLINE void EvrNetDHCP_ViewLeaseTime ( uint16_t  if_id,
uint32_t  lease_time 
)

Event on DHCP display address lease time (Op)

Parameters
if_idnetwork interface identifier
lease_timelease time in seconds

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • time: lease time in seconds.

◆ EvrNetDHCP_ViewMessage()

__STATIC_INLINE void EvrNetDHCP_ViewMessage ( uint16_t  if_id,
uint8_t  msg_type 
)

Event on DHCP display message type (Op)

Parameters
if_idnetwork interface identifier
msg_typemessage type

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • type: received DHCP message type.

◆ EvrNetDHCP_ViewNetMask()

__STATIC_INLINE void EvrNetDHCP_ViewNetMask ( uint16_t  if_id,
const uint8_t *  net_mask 
)

Event on DHCP display Network Mask (Op)

Parameters
if_idnetwork interface identifier
net_maskpointer to network mask

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • mask: network mask.

◆ EvrNetDHCP_ViewNtpServerList()

__STATIC_INLINE void EvrNetDHCP_ViewNtpServerList ( uint16_t  if_id,
const uint8_t *  ntp_list,
uint32_t  length 
)

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

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

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • ntp: list of NTP server IP addresses.

◆ EvrNetDHCP_ViewOfferedAddress()

__STATIC_INLINE void EvrNetDHCP_ViewOfferedAddress ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP display offered IP address (Op)

Parameters
if_idnetwork interface identifier
ip4_addrpointer to IPv4 address

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • ip: offered IP address.

◆ EvrNetDHCP_ViewRelayAgentAddress()

__STATIC_INLINE void EvrNetDHCP_ViewRelayAgentAddress ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP display relay agent IP address (Detail)

Parameters
if_idnetwork interface identifier
ip4_addrpointer to IPv4 address

The event ViewRelayAgentAddress 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:

  • netif: network interface identifier.
  • relay: IP address of the relay agent.

◆ EvrNetDHCP_ViewServerId()

__STATIC_INLINE void EvrNetDHCP_ViewServerId ( uint16_t  if_id,
const uint8_t *  ip4_addr 
)

Event on DHCP display Server Identifier (Op)

Parameters
if_idnetwork interface identifier
ip4_addrpointer to IPv4 address

The event ViewServerId 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:

  • netif: network interface identifier.
  • server_id: DHCP server identifier.

◆ EvrNetDHCP_ViewTimeT1()

__STATIC_INLINE void EvrNetDHCP_ViewTimeT1 ( uint16_t  if_id,
uint32_t  t1_time 
)

Event on DHCP display renewal time T1 (Op)

Parameters
if_idnetwork interface identifier
t1_timet1 time in seconds

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • t1: lease renewal time in seconds.

◆ EvrNetDHCP_ViewTimeT2()

__STATIC_INLINE void EvrNetDHCP_ViewTimeT2 ( uint16_t  if_id,
uint32_t  t2_time 
)

Event on DHCP display rebinding time T2 (Op)

Parameters
if_idnetwork interface identifier
t2_timet2 time in seconds

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

Value in the Event Recorder shows:

  • netif: network interface identifier.
  • t2: lease rebinding time in seconds.

◆ EvrNetDHCP_WrongClientHwAddress()

__STATIC_INLINE void EvrNetDHCP_WrongClientHwAddress ( uint16_t  if_id,
const uint8_t *  chaddr 
)

Event on DHCP receive wrong Client Hardware Address (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • chaddr: received client hardware address value.

◆ EvrNetDHCP_WrongMagicCookie()

__STATIC_INLINE void EvrNetDHCP_WrongMagicCookie ( uint16_t  if_id,
uint32_t  cookie,
uint32_t  cookie_valid 
)

Event on DHCP receive wrong BOOTP Magic Cookie (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • cookie: received BOOTP magic cookie.
  • valid: expected BOOTP magic cookie.

◆ EvrNetDHCP_WrongServerPort()

__STATIC_INLINE void EvrNetDHCP_WrongServerPort ( uint16_t  if_id,
uint16_t  port,
uint16_t  port_valid 
)

Event on DHCP wrong server UDP port (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • port: received server UDP port.
  • valid: expected server UDP port.

◆ EvrNetDHCP_WrongTransactionId()

__STATIC_INLINE void EvrNetDHCP_WrongTransactionId ( uint16_t  if_id,
uint32_t  xid,
uint32_t  xid_valid 
)

Event on DHCP receive wrong transaction identifier (Error)

Parameters
if_idnetwork interface identifier
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:

  • netif: network interface identifier.
  • xid: received transaction identifier.
  • valid: expected transaction identifier.