huyc

导航

2011年11月3日 #

ipq_errstr,ipq_perror

摘要: IPQ_ERRSTR(3) 2001-10-16NAME ipq_errstr, ipq_perror —— libipq错误处理例程SYNOPSIS#include <linux/netfilter.h>#include <libipq.h>char *ipq_errstr(void);void ipq_perror(const char *s);DESCRIPTION函数ipq_errstr返回一个错误描述,基于内部ipq_errno变量的当前值。所有的libipq的API函数将在错误时设置此变量。函数ipq_perror打印错误消息到stderr,该消息与内部变量 阅读全文

posted @ 2011-11-03 20:31 huyc 阅读(243) 评论(0) 推荐(0)

ipq_set_verdict(3)

摘要: IPQ_SET_VERDICT(3) 2001-10-16NAME ipq_set_verdict —— 下达判决,可选地修改给内核的数据包SYNOPSIS#include <linux/netfilter.h>#include <libipq.h>int ipq_set_verdict(const struct ipq_handle *h, ipq_id_t id, unsigned int verdict, size_t data_len, unsigned char *buf);DESCRIPTION函数ipq_set_verdict对之前调用ipq_read获取 阅读全文

posted @ 2011-11-03 20:23 huyc 阅读(883) 评论(0) 推荐(0)

ipq_set_mode(3)

摘要: IPQ_SET_MODE(3) 2001-10-16NAME ipq_set_mode —— 设置ip_queue的排队模式SYNOPSIS#include <linux/netfilter.h>#include <libipq.h>int ipq_set_mode(const struct ipq_handle *h, u_int8_t mode, size_t range);DESCRIPTION函数ipq_set_mode发送一个消息给内核ip_queue模块,指定是仅发送数据包元数据,还是将数据包负载带着元数据一起拷贝到用户空间。参数h是一个上下文句柄,其必须是 阅读全文

posted @ 2011-11-03 20:05 huyc 阅读(746) 评论(0) 推荐(0)

ipq_message_type,ipq_get_packet,ipq_getmsgerr

摘要: IPQ_MESSAGE_TYPE(3) 2001-10-16NAME ipq_message_type, ipq_get_packet, ipq_getmsgerr —— 查询排队消息SYNOPSIS#include <linux/netfilter.h>#include <libipq.h>int ipq_message_type(const unsigned char *buf);ipq_packet_msg_t *ipq_get_packet(const unsigned char *buf);int ipq_get_msgerr(const unsigned c 阅读全文

posted @ 2011-11-03 19:47 huyc 阅读(950) 评论(0) 推荐(0)

ipq_read(3)

摘要: IPQ_READ(3) 2001-10-16NAME ipq_read —— 将来自ip_queue的消息队列读取到指定的缓冲区SYNOPSIS#include <linux/netfilter.h>#include <libipq.h>ssize_t ipq_read(const struct ipq_handle *h, unsigned char *buf, size_t len, int timeout);DESCRIPTION函数ipq_read从内核读取一个队列消息并将其拷贝到buf指向的内存,最大拷贝长度为len。参数h是一个上下文句柄,它必须是之前调用i 阅读全文

posted @ 2011-11-03 19:14 huyc 阅读(821) 评论(0) 推荐(0)

ipq_create_handle,ipq_destroy_handle

摘要: IPQ_CREATE_HANDLE(3)2001-10-16NAME ipq_create_handle, ipq_destroy_handle —— 创建和销毁libipq句柄。SYNOPSIS#include <linux/netfilter.h>#include <libipq.h>struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t protocol);int ipq_destroy_handle(struct ipq_handle *h);DESCRIPTION函数ipq_create_ 阅读全文

posted @ 2011-11-03 16:39 huyc 阅读(773) 评论(0) 推荐(0)