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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
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) |
Convert an u16_t from host- to network byte order. | |
u32_t | lwip_htonl (u32_t n) |
Convert an u32_t from host- to network byte order. | |
char * | lwip_strnstr (const char *buffer, const char *token, size_t n) |
lwIP default implementation for strnstr() non-standard function. | |
int | lwip_stricmp (const char *str1, const char *str2) |
lwIP default implementation for stricmp() non-standard function. | |
int | lwip_strnicmp (const char *str1, const char *str2, size_t len) |
lwIP default implementation for strnicmp() non-standard function. | |
void | lwip_itoa (char *result, size_t bufsize, int number) |
lwIP default implementation for itoa() non-standard function. |
Detailed Description
Common functions used throughout the stack.
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_htons(x) your_htons #define lwip_htonl(x) your_htonl
Note lwip_ntohs() and lwip_ntohl() are merely references to the htonx counterparts.
If you #define them to htons() and htonl(), you should #define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS to prevent lwIP from defining htonx/ntohx compatibility macros.
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 90 of file lwip_def.c.
u16_t lwip_htons | ( | u16_t | n ) |
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 76 of file lwip_def.c.
Generated on Tue Jul 12 2022 13:55:13 by
