- 论坛徽章:
- 0
|
请高手们不吝赐教,代码如下:
#if defined(MODVERSIONS)
#include <linux/modversions.h>
#endif
#include <linux/module.h>
#include <linux/version.h>
#include "ipt_ipp2p.h"
#include <net/tcp.h>
#include <net/udp.h>
#define get_u8(X,O) (*(__u8 *)(X + O))
#define get_u16(X,O) (*(__u16 *)(X + O))
#define get_u32(X,O) (*(__u32 *)(X + O))
................
/* feidian */
if ( (plen == 4 && get_u32(payload,0) == __constant_htonl(0x291c3201)) || (plen == 61 && get_u32(payload,0) == __constant_htonl(0x291c3201) && get_u32(payload,4) == __constant_htonl(0x39000000))) return (IPP2P_PP * 100 + 7);
以上代码是什么意思?要封掉什么样的数据包?被封掉的数据包原样是怎么样的?
先谢过了?
加:
plen==4是指数据包长?数据包头长?
__constant_htonl(0x291c3201)的结果是“01321C29” ?
get_u32()和get_u16()是什么意思?
[ 本帖最后由 cuplin2002 于 2008-5-21 16:19 编辑 ] |
|