桥接基本原理:
eth0(本地物理网卡)tap0,tap1....(tap是给kvm guest使用的接口)
1、创建桥
[shell]
#一般一个机器一个桥即可
sudo brctl addbr br0
[/shell]
2、创建若干tap
[shell]
#KVM需要几个虚拟网卡,就几个
sudo tunctl -t tap0 -u liheyuan
sudo tunctl -t tap1 -u liheyuan
......
[/shell]
3[......]
桥接基本原理:
eth0(本地物理网卡)tap0,tap1....(tap是给kvm guest使用的接口)
1、创建桥
[shell]
#一般一个机器一个桥即可
sudo brctl addbr br0
[/shell]
2、创建若干tap
[shell]
#KVM需要几个虚拟网卡,就几个
sudo tunctl -t tap0 -u liheyuan
sudo tunctl -t tap1 -u liheyuan
......
[/shell]
3[......]
1、安装相关依赖的包
sudo apt-get install gnome-core-devel
sudo apt-get install libglib2.0-doc libgtk2.0-doc
sudo apt-get install devhelp
sudo apt-get install glade-gnome glade-common glade-doc
2、如何方便的输入GTK+的include、lib依赖
#有一个命令可以方便搞定GTK+的include、lib依赖[......]
对于直接定义的Ethernet头
#pragma pack (0)
typedef struct ether_header
{
u_char ether_dhost[6]; //dest address
u_char ether_shost[6]; //src address
u_short ether_type; //type
}ether_header;
如果直接如下操作:
eh = (ether_header*)pkt_data;
switch(eh->ether[......]
libpcap中如何从区分Ethernet的承载包类型(IP、ARP、RARP)以及MAC地址
http://blog.sina.com.cn/s/blog_43a0370b010005p0.html
IP包格式
http://www.cnblogs.com/tuyile006/archive/2006/12/25/603185.html
http://www.freesoft.org/CIE/Course/Section3/7.htm
TCP包格式
http://blog.[......]
Linux自带的太恶心了,这个非常好用。
http://sourceforge.net/projects/tftp-server/
如何开机启动?
[shell]
vim /etc/rc.local
#把第一行的-e去掉,非常重要!
#然后在exit 0之前添加
/usr/bin/opentftpd &
[/shell][......]