Linuxϼ¸Àý×¥°ü³ÌÐò´úÂë
×¥°ü³ÌÐò1 grub_allpacket.c
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <linux/in.h>
#include <linux/if_ether.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int sock, n,i;
char buffer[2048];
unsigned char *iphead, *ethhead;
struct ifreq ethreq;
if ( (sock=socket(PF_PACKET, SOCK_RAW,
htons(ETH_P_IP)))<0) {
perror("socket");
exit(1);
}
/* Set the network card in promiscuos mode */
strncpy(ethreq.ifr_name,"eth0",IFNAMSIZ);
if (ioctl(sock,SIOCGIFFLAGS,ðreq)==-1) {
perror("ioctl");
close(sock);
exit(1);
}
ethreq.ifr_flags|=IFF_PROMISC;
if (ioctl(sock,SIOCSIFFLAGS,ðreq)==-1) {
perror("ioctl");
close(sock);
exit(1);
}
while (1) {
printf("----------\n");
n = recvfrom(sock,buffer,2048,0,NULL,NULL);
printf("%d bytes read\n",n);
printf("the frame content is :\n");
for(i=0;i<n;)
{
printf("%02x",(unsigned char)buffer[i]);
fflush(stdout);
i=i+1;
if(i%8==0)
printf("\n");
else
printf(":");
}
printf("\n");
/* Check to see if the packet contains at least
&nbs
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
²Ù×÷ϵͳµÄÒ»¸ö¾µäÎÊÌâÊÇ"Éú²úÕß-Ïû·ÑÕß"ÎÊÌâ, ÕâÉ漰ͬ²½ÐźÅÁ¿ºÍ»¥³âÐźÅÁ¿µÄÓ¦ÓÃ, ÔÚÕâÀï,ÎÒÓÃÏ̵߳Äͬ²½ºÍ»¥³âÀ´ÊµÏÖ.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#define N 2 // Ïû·ÑÕß» ......
1.1.1 iptablesÔÀí
1.1.2 ÒÔ±¾µØΪԴµÄ°ü·¾¶
Step
Table
Chain
Comment
1
±¾µØ³ÌÐò£¨±ÈÈ磬·þÎñ³ÌÐò»ò¿Í»§³ÌÐò£©
2
·ÓÉÅжϣ¬ÒªÊ¹ÓÃÔ´µØÖ·£¬Íâ³ö½Ó¿Ú£¬»¹ÓÐÆäËûһЩÐÅÏ¢¡£
3
mangle
OUTPUT
ÔÚÕâ¶ù¿ÉÒÔmangle°ü¡£½¨Òé²»ÒªÔÚÕâ¶ù×ö¹ýÂË£¬¿ ......
system-config-printer ͼÐνçÃæÉèÖôòÓ¡»ú
BSD(FreeBSD)/System V
lpr/lp ´òÓ¡ÎļþÃû ´òÓ¡
lpr -P´òÓ¡»úÃû ´òÓ¡ÎļþÃû
lp &nb ......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
ÔÚ±¾ÎÄÖУ¬Ëùν“
Linux
֮·”ÊÇָͨÏòÍêÃÀ
Linux
×ÀÃæµÄµÀ·¡£Ì¸Æð
Linux
×ÀÃ棬ÓÐÈ˲»Ð¼Ò»¹Ë£¬àÍÖ®ÒԱǡ£Êµ¼ÊÇé¿öÈçºÎ£¿
11
ÔÂ
......