2014年3月13日

ARP 协议

摘要: MAC地址是用于物理上直接连接(在中继器能力范围内)的机器相互通信,IP地址是用于不同网络中间的机器相互通信,这是由传统的以太网的拓扑结构(总线型)决定的。发送packet只能在数据链路层,由MAC地址来识别,当同一网络中的机器通信时,需要预先知道对方的MAC地址,否则向本网络发送ARP广播;当不同网络的机器相互通信时,需要知道网关的MAC地址,否则向本网络发送ARP广播;正是因为不知道MAC地址,才发送广播,知道的话,直接发送packet。对方需要知道收到的packet的格式,才能正确通信,ARP就是其中一种。只有比对IP地址才知道是不是在同一网络。当不同网络的机器通信时,先发packet给 阅读全文

posted @ 2014-03-13 22:20 Happykiller 阅读(353) 评论(0) 推荐(0) 编辑

2013年12月24日

传值,传指针,传引用

摘要: 传值void swap(int a, int b);int a1 = 2, b1 = 3;swap(a1,b1);--------------------------------a=2, b=3 (a,b是局部变量,有自己的地址,a和a1, b和b1的地址是不同的,只是值相同而已)传指针 (本质上也是传值,只不过传的是指针这个值)void swap(int *a, int *b);int a1 = 2, b1 = 3;swap(&a1, &b1);--------------------------------a=a1的地址,b=b1的地址 (a,b是局部变量,有自己的地址,其 阅读全文

posted @ 2013-12-24 22:39 Happykiller 阅读(311) 评论(0) 推荐(0) 编辑

2012年10月11日

ADB Shell Command Reference

摘要: So we have seen a lot of ADB shell commands, but running below command will give you a full list:adb shell ls /system/binActually they are files that located in the /system/bin/ directory of emulator/device.getprop/setprop/watchprops, running getprop will display settings of device/emulator like bel 阅读全文

posted @ 2012-10-11 15:06 Happykiller 阅读(891) 评论(0) 推荐(0) 编辑

Ubuntu 10.04 32-bit 共享不可见

摘要: GUEST LINUX OSVM -> Settings -> Options -> Shared Folders. And added my folder.Installed properly my VMware tools (I can drag and drop files so I am confident that it is installed)HOST WINDOWS OSShared the folder with everyone (to assure that there is no permit limitations with my files)whe 阅读全文

posted @ 2012-10-11 14:27 Happykiller 阅读(234) 评论(0) 推荐(0) 编辑

导航