![]() |
WE310F5
39.00.000
|
This section describes the M2MB APIs to perform network utilities. More...
#define | min(a, b) (((a) <= (b)) ? (a) : (b)) |
macro to find minimum value in between two values More... | |
#define | m2mb_socket_bsd_htonl(l) |
Conversion between host and network byte order. More... | |
#define | m2mb_socket_bsd_ntohl(l) m2mb_socket_bsd_htonl(l) |
Conversion between host and network byte order. More... | |
#define | m2mb_socket_bsd_htons(s) ((((s) >> 8) & 0xff) | (((s) << 8) & 0xff00)) |
Conversion between host and network byte order. More... | |
#define | m2mb_socket_bsd_ntohs(s) m2mb_socket_bsd_htons(s) |
Conversion between host and network byte order. More... | |
typedef struct M2MB_Q_ELT | M2MB_Q_ELT_T |
typedef M2MB_Q_ELT_T * | qp |
typedef struct M2MB_QUEUE | M2MB_QUEUE_T |
queue header More... | |
UINT32 | m2mb_get_time (TIME_STRUCT_T *time) |
Getting time. More... | |
void | m2mb_msec_delay (UINT32 ms) |
provides milliseconds delay. More... | |
void | m2mb_usec_delay (UINT32 us) |
provides micro seconds delay. More... | |
void | enqueue (M2MB_QUEUE_T *q, void *item) |
add item to the q's tail More... | |
void * | dequeue (M2MB_QUEUE_T *q) |
remove item from the q's head More... | |
This section describes the M2MB APIs to perform network utilities.
#define m2mb_socket_bsd_htonl | ( | l | ) |
Conversion between host and network byte order.
Converts the unsigned integer x from host byte order to network byte order.
[in] | l | Unsigned integer to be converted |
Example
Definition at line 99 of file m2mb_netutils.h.
#define m2mb_socket_bsd_htons | ( | s | ) | ((((s) >> 8) & 0xff) | (((s) << 8) & 0xff00)) |
Conversion between host and network byte order.
Converts the unsigned short integer x from host byte order to network byte order
[in] | s | Unsigned short integer to be converted |
Example
Definition at line 151 of file m2mb_netutils.h.
#define m2mb_socket_bsd_ntohl | ( | l | ) | m2mb_socket_bsd_htonl(l) |
Conversion between host and network byte order.
Converts the unsigned integer x from network byte order to host byte order.
[in] | l | Unsigned integer to be converted |
Example
Definition at line 126 of file m2mb_netutils.h.
#define m2mb_socket_bsd_ntohs | ( | s | ) | m2mb_socket_bsd_htons(s) |
Conversion between host and network byte order.
Converts the unsigned short integer x from network byte order to host byte order
[in] | s | Unsigned short integer to be converted |
Example
Definition at line 175 of file m2mb_netutils.h.
#define min | ( | a, | |
b | |||
) | (((a) <= (b)) ? (a) : (b)) |
macro to find minimum value in between two values
Definition at line 45 of file m2mb_netutils.h.
typedef struct M2MB_Q_ELT M2MB_Q_ELT_T |
typedef struct M2MB_QUEUE M2MB_QUEUE_T |
queue header
typedef M2MB_Q_ELT_T* qp |
q pointer
Definition at line 53 of file m2mb_netutils.h.
void* dequeue | ( | M2MB_QUEUE_T * | q | ) |
remove item from the q's head
remove item from the q's head
[in] | q | queue pointer to add item to it. |
Example
void enqueue | ( | M2MB_QUEUE_T * | q, |
void * | item | ||
) |
add item to the q's tail
add item to the q's tail
[in] | q | queue pointer to add item to it. |
[in] | item | item to add to queue |
Example
UINT32 m2mb_get_time | ( | TIME_STRUCT_T * | time | ) |
Getting time.
Getting time.
[out] | time | Pointer to a TIME_STRUCT_T to contain the time. |
Example
void m2mb_msec_delay | ( | UINT32 | ms | ) |
provides milliseconds delay.
Suspends the current thread for the specified time interval
[in] | ms | delay value in milliseconds. |
Example
void m2mb_usec_delay | ( | UINT32 | us | ) |
provides micro seconds delay.
Suspends the current thread for the specified time interval
[in] | us | delay value in micro seconds. |
Example