源码地带 > 电路图 > 电子资料下载 > 网络 >ipsec vpn > 查看压缩包源码

ipsec vpn

源代码在线查看: port.h

软件大小: 3514 K
上传用户: akk79600872
关键词: ipsec vpn
下载地址: 免注册下载 普通下载 VIP

相关代码

				/* Copyright 2002 Jeff Dike				 * Licensed under the GPL				 */								#ifndef __PORT_H__				#define __PORT_H__								#include 				#include 								struct netjig_state;				struct nethub;				struct port;				struct packet;								typedef void (*packet_sender)(int fd, void *packet, int len, void *data);								/* in port.c */				extern void handle_sock_data(struct netjig_state *ns,							     struct nethub *nh);				extern void handle_tap_data(struct netjig_state *ns,							    struct nethub  *nh);								extern void handle_port(struct netjig_state *ns,							struct nethub       *nh,							struct pollfd  *l_fds,							int             l_nfds,							int            *l_fd_array,							int             l_fd_array_size);								extern void handle_data(struct netjig_state *ns,							struct nethub *nh,							struct packet *packet, int len,							int   fd,							void *data, int (*matcher)(int port_fd, int data_fd, 										   void *port_data,										   int port_data_len, 										   void *data));								void insert_data(struct netjig_state *ns,						 struct nethub *nh,						 struct packet *packet, int len);												extern void close_port(struct netjig_state *ns,						       struct nethub       *nh,						       int fd);				extern int setup_sock_port(struct netjig_state *ns,							   struct nethub       *nh,							   struct port        *port,							   struct sockaddr_un *name);								extern void setup_port(struct netjig_state *ns,						       struct nethub       *nh,						       struct port         *port,						       int fd,						       void (*sender)(int fd, void *packet, int len, 								      void *data),						       void *data, int data_len);								extern struct port *alloc_port(struct netjig_state *ns,							       struct nethub       *nh);												extern int setup_sock_tap(struct netjig_state *ns,							  struct nethub       *nh,							  int    fd,							  packet_sender        tap_sender);								extern void accept_connection(struct netjig_state *ns, struct nethub *nh);								#endif							

相关资源