This page is in Pre Alpha. That means no grammer checks, no editting and speeling mistakes galore! The explanations and the final version will come soon. Check it out at your own risk! sniffer.c #include #include FILE *fp; void abc(unsigned char p) { fprintf(fp,"..%x..%d..%c\n",p,p,p); } union REGS a,b; struct SREGS s; unsigned char ad[6]; unsigned char c[2]; int handle,i,y,ii; unsigned char d[60],e[600]; void interrupt zzz(bp, di, si, ds, es, dx, cx, bx, ax, ip, cs, flags) unsigned short bp, di, si, ds, es, dx, cx, bx, ax, ip, cs, flags; { printf("Reciever ax=%d Packet Size %d\n",ax,cx); if ( ax == 0) { es=FP_SEG(e); di=FP_OFF(e); ii=cx; } if ( ax==1) { for ( i=0;i<=ii;i++) abc(e[i]); } } main( ) { fp=fopen("c:\\z.txt","a+"); segread(&s); a.h.ah=1; a.h.al=255; int86x(0x60,&a,&b,&s); printf("Carry Flag Driver Info %d\n",b.x.cflag); printf("Class %d Type %d\n",b.h.ch,b.x.dx); a.h.ah=6; a.x.cx=6; s.es=FP_SEG(ad); a.x.di=FP_OFF(ad); int86x(0x60,&a,&b,&s); printf("Carry Flag Ethernet Address %d\n",b.x.cflag); printf("Ethernet Address is %x:%x:%x:%x:%x:%x\n", ad[0], ad[1], ad[2], ad[3], ad[4], ad[5] ); a.h.al=1; a.x.bx=-1; a.h.dl=0; a.x.cx=0; a.h.ah=2; s.es=FP_SEG(zzz); a.x.di=FP_OFF(zzz); c[0]=0xff;c[1]=0xff; s.ds=FP_SEG(c); a.x.si=FP_OFF(c); int86x(0x60,&a,&b,&s); printf("Carry Flag Access Type %d\n",b.x.cflag); printf("Handle %d\n",b.x.ax); handle=b.x.ax; a.h.ah=21; a.x.bx=handle; int86x(0x60,&a,&b,&s); printf("Carry Flag Get Recieve Mode %d\n",b.x.cflag); printf("Recieve Mode %d\n",b.x.ax); a.h.ah=20; a.x.bx=handle; a.x.cx=6; int86x(0x60,&a,&b,&s); printf("Carry Flag Set Recieve Mode %d\n",b.x.cflag); getch(); getch(); a.h.ah=3; a.x.bx=handle; int86x(0x60,&a,&b,&s); printf("Carry Flag Release Type %d\n",b.x.cflag); printf("All Over\n"); fclose(fp); }