Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
lwip_def.c File Reference
Common functions used throughout the stack. More...
Go to the source code of this file.
Functions | |
u16_t | lwip_htons (u16_t n) |
These are reference implementations of the byte swapping functions. | |
u16_t | lwip_ntohs (u16_t n) |
Convert an u16_t from network- to host byte order. | |
u32_t | lwip_htonl (u32_t n) |
Convert an u32_t from host- to network byte order. | |
u32_t | lwip_ntohl (u32_t n) |
Convert an u32_t from network- to host byte order. |
Detailed Description
Common functions used throughout the stack.
Definition in file lwip_def.c.
Function Documentation
u32_t lwip_htonl | ( | u32_t | n ) |
Convert an u32_t from host- to network byte order.
- Parameters:
-
n u32_t in host byte order
- Returns:
- n in network byte order
Definition at line 88 of file lwip_def.c.
u16_t lwip_htons | ( | u16_t | n ) |
These are reference implementations of the byte swapping functions.
Again with the aim of being simple, correct and fully portable. Byte swapping is the second thing you would want to optimize. You will need to port it to your architecture and in your cc.h:
define LWIP_PLATFORM_BYTESWAP 1 define LWIP_PLATFORM_HTONS(x) <your_htons> define LWIP_PLATFORM_HTONL(x) <your_htonl>
Note ntohs() and ntohl() are merely references to the htonx counterparts. Convert an u16_t from host- to network byte order.
- Parameters:
-
n u16_t in host byte order
- Returns:
- n in network byte order
Definition at line 64 of file lwip_def.c.
u32_t lwip_ntohl | ( | u32_t | n ) |
Convert an u32_t from network- to host byte order.
- Parameters:
-
n u32_t in network byte order
- Returns:
- n in host byte order
Definition at line 103 of file lwip_def.c.
u16_t lwip_ntohs | ( | u16_t | n ) |
Convert an u16_t from network- to host byte order.
- Parameters:
-
n u16_t in network byte order
- Returns:
- n in host byte order
Definition at line 76 of file lwip_def.c.
Generated on Tue Jul 12 2022 17:35:02 by
