Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

inline.h

Go to the documentation of this file.
00001 // $Id$
00002 #ifndef __INLINE_H__
00003 #define __INLINE_H__
00004 
00005 #ifdef GIDS
00006 
00007 #ifndef IPFW
00008 #ifdef NFNETLINKQ
00009 #include <linux/netfilter/nfnetlink_queue.h>
00010 #include <libnetfilter_queue/libnetfilter_queue.h>
00011 #include <net/if.h>
00012 #endif /* NFNETLINKQ */
00013 #include <libipq.h>
00014 #include <linux/netfilter.h>
00015 #else
00016 #include <sys/types.h>
00017 #include <sys/time.h>
00018 #include <sys/unistd.h>
00019 #include <errno.h>
00020 #endif /* IPFW */
00021 
00022 #include "snort.h"
00023 
00024 typedef struct _inline_vals
00025 {
00026     int drop;
00027     int rejectsrc;
00028     int rejectdst;
00029     int reinject;
00030     int replace;
00031     int proto;
00032 } IV;
00033 
00034 #ifdef NFNETLINKQ
00035 u_int16_t nfqueue_num;
00036 struct nfnl_handle *nh;
00037 #else
00038 #ifndef IPFW
00039 struct ipq_handle *ipqh;
00040 #else
00041 int divert_socket;
00042 #endif /* IPFW */
00043 #endif /* NFNETLINKQ */
00044 
00045 
00046 IV iv;
00047 
00048 int InitInline();
00049 void InitInlinePostConfig(void);
00050 void RejectFuRestart();
00051 int InlineReject(Packet *); /* call to reject src in current packet for compat */
00052 int InlineRejectBoth(Packet *); /* call to reject current packet in both directions */
00053 int InlineRejectSrc(Packet *); /* call to reject src in current packet */
00054 int InlineRejectDst(Packet *); /* call to reject dst in current packet */
00055 #ifdef IPFW
00056 int InlineReinject(Packet *); /* call to reinject current packet */
00057 #endif
00058 int InlineAccept();
00059 int InlineReplace();
00060 
00061 #ifdef NFNETLINKQ
00062 void NfnetlinkQLoop();
00063 #else
00064 #ifndef IPFW
00065 void IpqLoop();
00066 #else
00067 void IpfwLoop();
00068 #endif /* IPFW */
00069 #endif /* NFNETLINKQ */
00070 
00071 
00072 #endif
00073 
00074 int InlineMode();
00075 int InlineDrop();  /* call to drop current packet */
00076 int opdsize;  /* original packet p->dsize for resets */
00077 #endif /* __INLINE_H__ */

Generated on Sun May 14 14:51:13 2006 by  doxygen 1.4.2