Network Component  Version 7.4.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 client 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 (uint32_t state)
 Event on DHCP client indication of client state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_NextState (uint32_t state)
 Event on DHCP client transition to next state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_StateRetransmit (uint32_t state)
 Event on DHCP client retransmit request in current state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ChangeStateOnTimeout (uint32_t current, uint32_t next)
 Event on DHCP client state timeout and transit to next state (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_AutoIpAddressProbe (const uint8_t *ip4_addr)
 Event on DHCP client address probe for AutoIP mode (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_AutoIpSuccess (const uint8_t *ip4_addr)
 Event on DHCP client assign AutoIP address success (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_T2Expired (uint32_t state)
 Event on DHCP client timer T2 expired (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_LeaseExpired (uint32_t state)
 Event on DHCP client address lease time expired (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_SendDhcpMessage (uint8_t msg_type, uint8_t broadcast)
 Event on DHCP client send message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ReceiveFrame (const uint8_t *ip4_addr, uint32_t length)
 Event on DHCP client receive frame (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongServerPort (uint16_t udp_port)
 Event on DHCP client wrong server port (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on DHCP client received frame too short (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_MisformedReply (void)
 Event on DHCP client received misformed reply (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongTransactionId (uint32_t xid, uint32_t xid_valid)
 Event on DHCP client wrong transaction identifier (XID) received (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongClientHwAddress (const uint8_t *chaddr)
 Event on DHCP client wrong Client Hardware Address (CHADDR) received (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_WrongMagicCookie (uint32_t magic_cookie)
 Event on DHCP client wrong BOOTP Magic Cookie received (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_NotDhcpOfferMessage (void)
 Event on DHCP client received message not DHCP_OFFER (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_DhcpOfferReceived (void)
 Event on DHCP client received DHCP_OFFER message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_FileOverloadedOptions (void)
 Event on DHCP client received options overloaded to "File" field (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_SnameOverloadedOptions (void)
 Event on DHCP client received options overloaded to "Sname" field (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_DhcpOfferServerIdMissing (void)
 Event on DHCP client received DHCP_OFFER with no Server ID (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ForwardedMessage (void)
 Event on DHCP client received forwarded message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_RelayAgentAddressInvalid (void)
 Event on DHCP client received message from invalid Relay Agent address (Error) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowRelayAgentAddress (const uint8_t *ip4_addr)
 Event on DHCP client display relay agent IP address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowOfferedIpAddress (const uint8_t *ip4_addr)
 Event on DHCP client display offered IP address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ServerAddressNotSelected (const uint8_t *ip4_addr)
 Event on DHCP client received message not from selected server (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_AssignedAddrNotRequested (const uint8_t *ip4_addr)
 Event on DHCP client assigned IP address in DHCP_ACK not the same as requested (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_NotDhcpAckMessage (void)
 Event on DHCP client received message not DHCP_ACK (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_DhcpAckReceived (void)
 Event on DHCP client received DHCP_ACK message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowAssignedAddress (const uint8_t *ip4_addr)
 Event on DHCP client display assigned IP address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_DhcpNakReceived (void)
 Event on DHCP client received DHCP_NAK message (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowServerId (const uint8_t *ip4_addr)
 Event on DHCP client display Server Identifier (IP address) (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowNetMask (const uint8_t *net_mask)
 Event on DHCP client display Network Mask (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowGatewayAddress (const uint8_t *ip4_addr)
 Event on DHCP client display gateway IPv4 address (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowDnsServers (const uint8_t *dns_list)
 Event on DHCP client display DNS server addresses (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowLeaseTime (uint32_t lease_time)
 Event on DHCP client display address lease time (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowTimeT1 (uint32_t t1_time)
 Event on DHCP client display renewal time T1 (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowTimeT2 (uint32_t t2_time)
 Event on DHCP client display rebinding time T2 (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowBootfileName (const uint8_t *bootfile, uint32_t length)
 Event on DHCP client display Bootfile Name (Op) More...
 
__STATIC_INLINE void EvrNetDHCP_ShowNtpServerList (const uint8_t *ntp_list, uint32_t length)
 Event on DHCP client display a list of NTP server addresses (Op) More...
 

Description

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

Function Documentation

__STATIC_INLINE void EvrNetDHCP_AssignedAddrNotRequested ( const uint8_t *  ip4_addr)

Event on DHCP client assigned IP address in DHCP_ACK not the same as requested (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_AutoIpAddressProbe ( const uint8_t *  ip4_addr)

Event on DHCP client address probe for AutoIP mode (Op)

Parameters
ip4_addrpointer to IP address
__STATIC_INLINE void EvrNetDHCP_AutoIpSuccess ( const uint8_t *  ip4_addr)

Event on DHCP client assign AutoIP address success (Op)

Parameters
ip4_addrpointer to assigned AutoIP address
__STATIC_INLINE void EvrNetDHCP_ChangeStateOnTimeout ( uint32_t  current,
uint32_t  next 
)

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

Parameters
currentcurrent state
nextnext state
__STATIC_INLINE void EvrNetDHCP_ClientState ( uint32_t  state)

Event on DHCP client indication of client state (Op)

Parameters
statecurrent state
__STATIC_INLINE void EvrNetDHCP_DhcpAckReceived ( void  )

Event on DHCP client received DHCP_ACK message (Op)

__STATIC_INLINE void EvrNetDHCP_DhcpNakReceived ( void  )

Event on DHCP client received DHCP_NAK message (Op)

__STATIC_INLINE void EvrNetDHCP_DhcpOfferReceived ( void  )

Event on DHCP client received DHCP_OFFER message (Op)

__STATIC_INLINE void EvrNetDHCP_DhcpOfferServerIdMissing ( void  )

Event on DHCP client received DHCP_OFFER with no Server ID (Op)

__STATIC_INLINE void EvrNetDHCP_FileOverloadedOptions ( void  )

Event on DHCP client received options overloaded to "File" field (Op)

__STATIC_INLINE void EvrNetDHCP_ForwardedMessage ( void  )

Event on DHCP client received forwarded message (Op)

__STATIC_INLINE void EvrNetDHCP_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on DHCP client received frame too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame
__STATIC_INLINE void EvrNetDHCP_GetSocketFailed ( void  )

Event on DHCP client failed to allocate UDP socket (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
__STATIC_INLINE void EvrNetDHCP_LeaseExpired ( uint32_t  state)

Event on DHCP client address lease time expired (Error)

Parameters
statecurrent state
__STATIC_INLINE void EvrNetDHCP_MisformedReply ( void  )

Event on DHCP client received misformed reply (Error)

__STATIC_INLINE void EvrNetDHCP_NextState ( uint32_t  state)

Event on DHCP client transition to next state (Op)

Parameters
statenext state
__STATIC_INLINE void EvrNetDHCP_NotDhcpAckMessage ( void  )

Event on DHCP client received message not DHCP_ACK (Op)

__STATIC_INLINE void EvrNetDHCP_NotDhcpOfferMessage ( void  )

Event on DHCP client received message not DHCP_OFFER (Op)

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

Event on DHCP client receive frame (Op)

Parameters
ip4_addrpointer to IPv4 address of the server
lengthframe length in bytes
__STATIC_INLINE void EvrNetDHCP_RelayAgentAddressInvalid ( void  )

Event on DHCP client received message from invalid Relay Agent address (Error)

__STATIC_INLINE void EvrNetDHCP_SendDhcpMessage ( uint8_t  msg_type,
uint8_t  broadcast 
)

Event on DHCP client send message (Op)

Parameters
msg_typemessage type
broadcastbroadcast the message
  • 0: no
  • 1: yes
__STATIC_INLINE void EvrNetDHCP_ServerAddressNotSelected ( const uint8_t *  ip4_addr)

Event on DHCP client received message not from selected server (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_ShowAssignedAddress ( const uint8_t *  ip4_addr)

Event on DHCP client display assigned IP address (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_ShowBootfileName ( const uint8_t *  bootfile,
uint32_t  length 
)

Event on DHCP client display Bootfile Name (Op)

Parameters
bootfilebootfile name string
lengthlength of the bootfile name string
__STATIC_INLINE void EvrNetDHCP_ShowDnsServers ( const uint8_t *  dns_list)

Event on DHCP client display DNS server addresses (Op)

Parameters
dns_listpointer to DNS server address list
Note
Displays primary and secondary DNS server address.
__STATIC_INLINE void EvrNetDHCP_ShowGatewayAddress ( const uint8_t *  ip4_addr)

Event on DHCP client display gateway IPv4 address (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_ShowLeaseTime ( uint32_t  lease_time)

Event on DHCP client display address lease time (Op)

Parameters
lease_timelease time in seconds
__STATIC_INLINE void EvrNetDHCP_ShowNetMask ( const uint8_t *  net_mask)

Event on DHCP client display Network Mask (Op)

Parameters
net_maskpointer to network mask
__STATIC_INLINE void EvrNetDHCP_ShowNtpServerList ( const uint8_t *  ntp_list,
uint32_t  length 
)

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

Parameters
ntp_listpointer to an array of NTP server IP addresses
lengthlength of an array in bytes
__STATIC_INLINE void EvrNetDHCP_ShowOfferedIpAddress ( const uint8_t *  ip4_addr)

Event on DHCP client display offered IP address (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_ShowRelayAgentAddress ( const uint8_t *  ip4_addr)

Event on DHCP client display relay agent IP address (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_ShowServerId ( const uint8_t *  ip4_addr)

Event on DHCP client display Server Identifier (IP address) (Op)

Parameters
ip4_addrpointer to IPv4 address
__STATIC_INLINE void EvrNetDHCP_ShowTimeT1 ( uint32_t  t1_time)

Event on DHCP client display renewal time T1 (Op)

Parameters
t1_timet1 time in seconds
__STATIC_INLINE void EvrNetDHCP_ShowTimeT2 ( uint32_t  t2_time)

Event on DHCP client display rebinding time T2 (Op)

Parameters
t2_timet2 time in seconds
__STATIC_INLINE void EvrNetDHCP_SnameOverloadedOptions ( void  )

Event on DHCP client received options overloaded to "Sname" field (Op)

__STATIC_INLINE void EvrNetDHCP_StartClient ( void  )

Event on DHCP client start (Op)

__STATIC_INLINE void EvrNetDHCP_StateRetransmit ( uint32_t  state)

Event on DHCP client retransmit request in current state (Op)

Parameters
statecurrent state
__STATIC_INLINE void EvrNetDHCP_StopClient ( void  )

Event on DHCP client stop (Op)

__STATIC_INLINE void EvrNetDHCP_T2Expired ( uint32_t  state)

Event on DHCP client timer T2 expired (Op)

Parameters
statecurrent state
__STATIC_INLINE void EvrNetDHCP_WrongClientHwAddress ( const uint8_t *  chaddr)

Event on DHCP client wrong Client Hardware Address (CHADDR) received (Error)

Parameters
chaddrpointer to received chaddr address (MAC)
__STATIC_INLINE void EvrNetDHCP_WrongMagicCookie ( uint32_t  magic_cookie)

Event on DHCP client wrong BOOTP Magic Cookie received (Error)

Parameters
magic_cookiewrong magic cookie value
__STATIC_INLINE void EvrNetDHCP_WrongServerPort ( uint16_t  udp_port)

Event on DHCP client wrong server port (Error)

Parameters
udp_portwrong UDP port number
__STATIC_INLINE void EvrNetDHCP_WrongTransactionId ( uint32_t  xid,
uint32_t  xid_valid 
)

Event on DHCP client wrong transaction identifier (XID) received (Error)

Parameters
xidtransaction identifier
xid_validexpected/valid transaction identifier