Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How to increment IP in C (http://www.go4expert.com/forums/increment-ip-c-t21554/)

en_7123 28Mar2010 10:32

How to increment IP in C
 
Is there any way of incrementing IP addresses like lets say the user enters
10.xxx.xxx.20 and he wants the next 20 IP so the program should display
10.xxx.xxx.21
10.xxx.xxx.22

and so on until the next 20 IP ??

xpi0t0s 29Mar2010 19:08

Re: How to increment IP in C
 
Not directly; you would need to parse the IP address entered (as a string, normally), extract the numbers, then generate the next 20 addresses from that.


All times are GMT +5.5. The time now is 06:26.