htons

Name

htons -- converts host byte order to network byte order

Synopsis

#include <netinet/in.h>

unsigned short int htons(unsigned short int hostshort);

Description

The htons() function converts the short integer hostshort from host byte order to network byte order.