htons

Description

Convert the unsigned short integer from host byte order to network byte order.

Syntax

htons <hostshort>

htons <hostshort>

  • Convert the unsigned short integer from host byte order to network byte order.

Examples

when HTTP_REQUEST {
  set hostshort 1234
  set netshort [htons $hostshort]
}