You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
847 B
20 lines
847 B
#ifndef _UTILITY_H
|
|
#define _UTILITY_H
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdarg.h>
|
|
#include "types.h"
|
|
|
|
|
|
uint16 htons( unsigned short hostshort); /* htons function converts a unsigned short from host to TCP/IP network byte order (which is big-endian).*/
|
|
|
|
uint32 htonl(unsigned long hostlong); /* htonl function converts a unsigned long from host to TCP/IP network byte order (which is big-endian). */
|
|
|
|
uint32 ntohs(unsigned short netshort); /* ntohs function converts a unsigned short from TCP/IP network byte order to host byte order (which is little-endian on Intel processors). */
|
|
|
|
uint32 ntohl(unsigned long netlong); /* ntohl function converts a u_long from TCP/IP network order to host byte order (which is little-endian on Intel processors). */
|
|
|
|
|
|
#endif
|