Choco OS
V.0.16.9.0
Join to the chocolate world
|
Functions | |
oC_ErrorCode_t | oC_Dhcp_SendMessage (oC_Netif_t Netif, oC_Dhcp_Message_t *Message, uint16_t Size, oC_Time_t Timeout) |
sends DHCP message to DHCP server More... | |
oC_ErrorCode_t | oC_Dhcp_ReceiveMessage (oC_Netif_t Netif, oC_Dhcp_Message_t *outMessage, oC_Time_t Timeout) |
receives DHCP message from DHCP server More... | |
oC_ErrorCode_t | oC_Dhcp_RequestIp (oC_Netif_t Netif, oC_Time_t Timeout) |
performs DHCP IP request procedure More... | |
oC_ErrorCode_t | oC_Dhcp_SendDiscovery (oC_Netif_t Netif, oC_Time_t Timeout) |
sends DHCP discovery message to DHCP server More... | |
oC_ErrorCode_t | oC_Dhcp_ReceiveOffer (oC_Netif_t Netif, oC_Time_t Timeout) |
receives offer from the DHCP server More... | |
oC_ErrorCode_t | oC_Dhcp_SendRequest (oC_Netif_t Netif, oC_Time_t Timeout) |
sends request message to the DHCP server More... | |
oC_ErrorCode_t | oC_Dhcp_ReceiveAcknowledge (oC_Netif_t Netif, oC_Time_t Timeout) |
receives ACK message from DHCP server More... | |
oC_ErrorCode_t oC_Dhcp_ReceiveAcknowledge | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function allows to receive an DHCP acknowledge from the DHCP server. The function oC_Dhcp_SendRequest should be called before this one.
Netif
, and it throws out the not matched messages.Netif | Pointer to the configured network interface |
Timeout | Maximum time for the receive request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_Timeout | Maximum time for the request elapsed |
oC_ErrorCode_t oC_Dhcp_ReceiveMessage | ( | oC_Netif_t | Netif, |
oC_Dhcp_Message_t * | outMessage, | ||
oC_Time_t | Timeout | ||
) |
The function receives DHCP message from DHCP server.
Netif | Pointer to the configured network interface |
outMessage | Destination for the DHCP message |
Timeout | Maximum time for the receive request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_OutputAddressNotInRAM | outMessage address does not contain address in RAM section |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_PortNotReserved | DHCP client UDP port is not reserved - please reserve it by using oC_Udp_ReservePort interface |
oC_ErrorCode_t oC_Dhcp_ReceiveOffer | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function allows to receive an DHCP offer from the DHCP server. The function oC_Dhcp_SendDiscovery should be called before this one.
Netif
, and it throws out the not matched messages.Netif | Pointer to the configured network interface |
Timeout | Maximum time for the receive request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_Timeout | Maximum time for the request elapsed |
oC_ErrorCode_t oC_Dhcp_RequestIp | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function is for performing DHCP request IP procedure. It can be called only by the root user.
Netif | Pointer to the configured network interface |
Timeout | Maximum time for the request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_NetifNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_LinkNotDetected | The Netif list state is not UP |
oC_ErrorCode_TimeNotCorrect | Timeout is smaller than 0! |
oC_ErrorCode_Timeout | Maximum time for the request elapsed |
oC_ErrorCode_PermissionDenied | You are not root user! |
oC_ErrorCode_t oC_Dhcp_SendDiscovery | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function sends DHCP discovery message to the DHCP server, which begins the IP reservation process. The next function that should be called after this one is oC_Dhcp_ReceiveOffer.
Netif | Pointer to the configured network interface |
Timeout | Maximum time for the receive request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_UnknownHardwareType | Netif is an network interface with unknown or unsupported hardware type. |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_Timeout | Maximum time for the request elapsed |
oC_ErrorCode_t oC_Dhcp_SendMessage | ( | oC_Netif_t | Netif, |
oC_Dhcp_Message_t * | Message, | ||
uint16_t | Size, | ||
oC_Time_t | Timeout | ||
) |
The function sends the DHCP message to the DHCP server.
Netif | Pointer to the configured network interface |
Message | DHCP message to send |
Size | Aligned size of the DHCP message |
Timeout | Maximum time for the request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_WrongAddress | Message address is not correct |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_AllocationError | Cannot allocate memory for a packet |
oC_ErrorCode_PortNotReserved | DHCP client UDP port is not reserved - please reserve it by using oC_Udp_ReservePort interface |
More error codes can be returned from the function oC_Udp_Send
oC_ErrorCode_t oC_Dhcp_SendRequest | ( | oC_Netif_t | Netif, |
oC_Time_t | Timeout | ||
) |
The function sends DHCP requet message to the DHCP server.
Netif | Pointer to the configured network interface |
Timeout | Maximum time for the request |
oC_ErrorCode_None
if successList of standard error codes, that can be returned by the function:
Code of error | Description |
---|---|
oC_ErrorCode_ObjectNotCorrect | Netif is not correct (address is not correct or not valid anymore) |
oC_ErrorCode_UnknownHardwareType | Type of the network interface hardware is not supported or not correct |
oC_ErrorCode_NotConfiguredYet | The Netif is not configured (oC_Netif_Configure has not been called) |
oC_ErrorCode_Timeout | Maximum time for the request elapsed |