PPP server IP ???
Hi all ,
can anyone tell me how to determine the client IP and the server IP when i run PPP client on my PC..... does the ifconfig output gives both the client and server IP ?? if yes then how to extract the server IP and client IP from that output (say while coding) ??? thanks :) |
A clumsy but simple way is to do this:
Code:
if(system("/sbin/ifconfig ppp0 > somescratchfile")) A tighter alternative is to use ioctl() instead of system(). Has that W. Richard Stevens book arrived at your bookseller yet? It will explain all this in detail. |
thanks for reply, :)
what i am doing is ifconfig -a which shows the all the interfaces that are up, but the weired thing happening here is ... ifconfig -a shows the ppp0 link is up and packets goes on increasing with time....but it is not showing any IP address or anything even though the link is up !!!!! :( :( and i checked by coming out from the LAN and brought down all the interfaces.. even then it is not showing the ip address. .. i tried using ioctl() but it is showing IP address for the interface eth0 but not for ppp0 even though the link is up :( and it is showing one more interface sit0 what is that ??? |
It would be a great idea to do five things.
Thing one: bring ppp up. Thing two: do this ... Code:
/sbin/ifconfig -a > file1.txt Thing four: do this ... Code:
/sbin/ifconfig -a > file2.txt |
hi,
sit stands for "simple internet transition" and is basically a device capable of encapsulating ipv6 in ipv4 datagrams. regards, Nirmal Tom. |
Thanks, Nirmal. I had no idea. I learn something new just about every day around here.
Now we get to sit back and wait for culin's response. (grin) |
All times are GMT -5. The time now is 10:09 AM. |