I'm getting an IP address and wan't to do a filtering on the first byte
Can anyone tell me how to convert an "IPAddress" to 4 integers.
Tried byte, integers....googled and googled.. but can't find it.
tnx
I'm getting an IP address and wan't to do a filtering on the first byte
Can anyone tell me how to convert an "IPAddress" to 4 integers.
Tried byte, integers....googled and googled.. but can't find it.
tnx
A combination of strtok to break up the string, and then atoi on each of the sets of digits, should do it.
Its very simple:
IPAddress ipaddr(192, 168, 1, 1);
uint8_t first_byte = ipaddr[0];
tnx that does the trick