📄 netbios.h
字号:
#include <sys/param.h>#include <sys/ioctl.h>#include <sys/select.h>#include <sys/socket.h>#include <sys/time.h>#include <netinet/udp.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/ip_icmp.h>#include <linux/if.h>#include <arpa/inet.h>#include <errno.h>#include <fcntl.h>#include <malloc.h>#include <memory.h>#include <netdb.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include "includes.h"#include <net/if_arp.h>#define MAXLEN 512class NetBios{ public: NetBios(); ~NetBios(); int initNetbios(); //init ip struct etc int setupDestAdd(char *,uint16_t); int sendNetbios(); //send name query packet int waitNetbiosEcho(); //return name number char *getUserName(); char *getGroupName(); u_char *getMac(); private: u_char recvbuf[MAXLEN]; struct ip *outip,*ip; struct udphdr *outudp,*udp; struct NetbiosNS *NS,*NS_data; struct sockaddr_in to,from; struct sockaddr *whereto,*wherefrom; struct answer *answer; struct name *myname; u_char *outp; int sndsock,recvsock; int packetlen,udpOffset,answerOffset,nameOffset,nameNumber,NsOffset; public: uint16_t tid;};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -