mikroSDK Reference Manual
dhcp_client_misc.h
Go to the documentation of this file.
1
31#ifndef _DHCP_CLIENT_MISC_H
32#define _DHCP_CLIENT_MISC_H
33
34//Dependencies
35#include "core/net.h"
36#include "dhcp/dhcp_client.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//Tick counter to handle periodic operations
44extern systime_t dhcpClientTickCounter;
45
46//DHCP client related functions
47void dhcpClientTick(DhcpClientContext *context);
48void dhcpClientLinkChangeEvent(DhcpClientContext *context);
49
50error_t dhcpClientSendDiscover(DhcpClientContext *context);
51error_t dhcpClientSendRequest(DhcpClientContext *context);
52error_t dhcpClientSendDecline(DhcpClientContext *context);
53error_t dhcpClientSendRelease(DhcpClientContext *context);
54
55void dhcpClientProcessMessage(NetInterface *interface,
56 const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader,
57 const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary,
58 void *param);
59
60void dhcpClientParseOffer(DhcpClientContext *context,
61 const DhcpMessage *message, size_t length);
62
63void dhcpClientParseAck(DhcpClientContext *context,
64 const DhcpMessage *message, size_t length);
65
66void dhcpClientParseNak(DhcpClientContext *context,
67 const DhcpMessage *message, size_t length);
68
69void dhcpClientCheckTimeout(DhcpClientContext *context);
70
71uint16_t dhcpClientComputeElapsedTime(DhcpClientContext *context);
72
73void dhcpClientChangeState(DhcpClientContext *context,
74 DhcpState newState, systime_t delay);
75
76void dhcpClientResetConfig(DhcpClientContext *context);
77void dhcpClientDumpConfig(DhcpClientContext *context);
78
79//C++ guard
80#ifdef __cplusplus
81}
82#endif
83
84#endif
DHCP client (Dynamic Host Configuration Protocol)
DhcpState
DHCP FSM states.
Definition dhcp_client.h:158
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.
uint32_t systime_t
System time.
Definition os_port_none.h:90
IP pseudo header.
Definition ip.h:91
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89