Fortinet white logo
Fortinet white logo

Script Reference Guide

Htonl(int)

Htonl(int)

Converts a 32 bit long integer from host byte order to network byte order.

Syntax

htonl(int);

Arguments

Name Description

int

An integer which will be calculated.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
str="0x12345678"
test=htonl(str)
debug("return : %x \n", test)
}
Result:
return: 78563412

Supported Version

FortiADC version 4.8.x and later.

Htonl(int)

Htonl(int)

Converts a 32 bit long integer from host byte order to network byte order.

Syntax

htonl(int);

Arguments

Name Description

int

An integer which will be calculated.

Events

Applicable in all events.

Example

when HTTP_REQUEST {
str="0x12345678"
test=htonl(str)
debug("return : %x \n", test)
}
Result:
return: 78563412

Supported Version

FortiADC version 4.8.x and later.