2.6.5 - IPToNumber | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver

Saturday/Sunday, March 28th&29th, 2020
Support: LabJack engineers available through email and chat.
Shipping: We are processing and shipping all orders.
Stock: 55/56 products in stock.
Supply Chain: Some disruptions.

2.6.5 - IPToNumber

Takes a decimal-dot IPv4 string representing an IPv4 address and outputs the corresponding integer version of the address.


                      const char * IPv4String,
                      unsigned int * Number)


IPv4String [in]
A decimal dot string representing an IPv4 address.
Number [out]
The numerical representation of IPv4String.


LJM errorcodes or 0 for no error. Returns LJME_INVALID_PARAMETER if IPv4String could not be parsed as an IPv4 address.


Use this function to convert a human-readable interpretation of an IP address into an integer value.


[C/C++] Convert an IPv4 string into a number.

int LJMError;
unsigned int Number;
LJMError = LJM_IPToNumber("", &Number);
printf ("%u \n", Number);
// prints 3232235983