linux IP µØÖ·µÄÅäÖ㨣©
ÎÒÏÖÔÚÓõÄÊÇdpch ½øÐÐÅäÖõÄ
Perl code:
abc ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:1e:ec:c1:94:75
inet addr:10.2.0.144 Bcast:10.2.1.255 Mask:255.255.254.0
inet6 addr: fe80::21e:ecff:fec1:9475/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:864 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80473 (78.5 KiB) TX bytes:2548 (2.4 KiB)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:388 errors:0 dropped:0 overruns:0 frame:0
TX packets:388 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31276 (30.5 KiB) TX bytes:31276 (30.5 KiB)
abc ~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.2.0.0 * 255.255.254.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 10.2.1.254 0.0.0.0 UG 0 0 0 eth0
ÎÒÏë°ÑÕâ¸öÅäÖÃ×÷ΪÎÒµÄÓ
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÇëÓоÑé̳ÓÑ̸̸×öC++¿ª·¢ÓëLinuxµÄ¹Øϵ£¬¾ÍÊÇ¿ª·¢ÊDz»ÊÇÒ»°ã¶¼ÔÚLinuxϽøÐеÄÖ®ÀàµÄ»°Ìâ¡£
¿ª·¢¿ÉÒÔ²»ÔÙLinuxÏ£¬µ«µ÷ÊÔÒª×öLinuxÏ¡£
¿ª·¢Ëæ±ã£¬Ö»ÒªÊDZê×¼C++£¬Windows϶¼¿ÉÒÔµ÷ÊÔ
Á½Õ߶¼¿ÉÒÔ~~~
¿ª ......
°²×°Mandrake9.0ºó£¬ÔÚÃüÁîÐУ¬ÈçºÎ½øÈë×ÀÃæ°æ?
Mandrake9.0ÓÐûÓÐ×ÀÃæ°æ?
Èç¹ûÓÃlinux×ÀÃæ°æ£¬ÓÃÄĸö°æ±¾±È½ÏºÃ£¿¹òÇóÏÂÔصØÖ·
ÓÃUBUNTU°É Õâ¸ö±È½Ï¼òµ¥
http://distrowatch.com/
......
ÎÒÔÚlinuxÏÂдÁ˸öUDPµÄserverºÍclientµÄ´úÂ룬
ÏÖÔÚ³öÁËÕâÑùÒ»¸öÎÊÌ⣬
serverÊÕµ½ÁËclientµÄÊý¾Ý£¬²¢»Ø¸´ÁË£¬µ«ÊÇclientÒ»Ö±ÊÕ²»µ½server»Ø¸´µÄÄÚÈÝ£¬£¬ºóÀ´ÎÒÓÃ×¥°ü¹¤¾ß½¨Á¢ÁËÒ»¸öserverÀ´Á¬½Ó֮ǰµÄcl ......