Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
nf_conntrack_sip.c File Reference
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/skbuff.h>
#include <linux/inet.h>
#include <linux/in.h>
#include <linux/udp.h>
#include <linux/tcp.h>
#include <linux/netfilter.h>
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_core.h>
#include <net/netfilter/nf_conntrack_expect.h>
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_zones.h>
#include <linux/netfilter/nf_conntrack_sip.h>

Go to the source code of this file.

Macros

#define MAX_PORTS   8
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Christian Hentschel <chentschel@arnet.com.ar>")
 
 MODULE_DESCRIPTION ("SIP connection tracking helper")
 
 MODULE_ALIAS ("ip_conntrack_sip")
 
 MODULE_ALIAS_NFCT_HELPER ("sip")
 
 module_param_array (ports, ushort,&ports_c, 0400)
 
 MODULE_PARM_DESC (ports,"port numbers of SIP servers")
 
 module_param (sip_timeout, uint, 0600)
 
 MODULE_PARM_DESC (sip_timeout,"timeout for the master SIP session")
 
 module_param (sip_direct_signalling, int, 0600)
 
 MODULE_PARM_DESC (sip_direct_signalling,"expect incoming calls from registrar ""only (default 1)")
 
 module_param (sip_direct_media, int, 0600)
 
 MODULE_PARM_DESC (sip_direct_media,"Expect Media streams between signalling ""endpoints only (default 1)")
 
 EXPORT_SYMBOL_GPL (nf_nat_sip_hook)
 
 EXPORT_SYMBOL_GPL (nf_nat_sip_seq_adjust_hook)
 
 EXPORT_SYMBOL_GPL (nf_nat_sip_expect_hook)
 
 EXPORT_SYMBOL_GPL (nf_nat_sdp_addr_hook)
 
 EXPORT_SYMBOL_GPL (nf_nat_sdp_port_hook)
 
 EXPORT_SYMBOL_GPL (nf_nat_sdp_session_hook)
 
 EXPORT_SYMBOL_GPL (nf_nat_sdp_media_hook)
 
int ct_sip_parse_request (const struct nf_conn *ct, const char *dptr, unsigned int datalen, unsigned int *matchoff, unsigned int *matchlen, union nf_inet_addr *addr, __be16 *port)
 
 EXPORT_SYMBOL_GPL (ct_sip_parse_request)
 
int ct_sip_get_header (const struct nf_conn *ct, const char *dptr, unsigned int dataoff, unsigned int datalen, enum sip_header_types type, unsigned int *matchoff, unsigned int *matchlen)
 
 EXPORT_SYMBOL_GPL (ct_sip_get_header)
 
int ct_sip_parse_header_uri (const struct nf_conn *ct, const char *dptr, unsigned int *dataoff, unsigned int datalen, enum sip_header_types type, int *in_header, unsigned int *matchoff, unsigned int *matchlen, union nf_inet_addr *addr, __be16 *port)
 
 EXPORT_SYMBOL_GPL (ct_sip_parse_header_uri)
 
int ct_sip_parse_address_param (const struct nf_conn *ct, const char *dptr, unsigned int dataoff, unsigned int datalen, const char *name, unsigned int *matchoff, unsigned int *matchlen, union nf_inet_addr *addr, bool delim)
 
 EXPORT_SYMBOL_GPL (ct_sip_parse_address_param)
 
int ct_sip_parse_numerical_param (const struct nf_conn *ct, const char *dptr, unsigned int dataoff, unsigned int datalen, const char *name, unsigned int *matchoff, unsigned int *matchlen, unsigned int *val)
 
 EXPORT_SYMBOL_GPL (ct_sip_parse_numerical_param)
 
int ct_sip_get_sdp_header (const struct nf_conn *ct, const char *dptr, unsigned int dataoff, unsigned int datalen, enum sdp_header_types type, enum sdp_header_types term, unsigned int *matchoff, unsigned int *matchlen)
 
 EXPORT_SYMBOL_GPL (ct_sip_get_sdp_header)
 
 module_init (nf_conntrack_sip_init)
 
 module_exit (nf_conntrack_sip_fini)
 

Variables

unsigned int(* nf_nat_sip_hook )(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen) __read_mostly
 
void(* nf_nat_sip_seq_adjust_hook )(struct sk_buff *skb, unsigned int protoff, s16 off) __read_mostly
 
unsigned int(* nf_nat_sip_expect_hook )(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, struct nf_conntrack_expect *exp, unsigned int matchoff, unsigned int matchlen) __read_mostly
 
unsigned int(* nf_nat_sdp_addr_hook )(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, unsigned int sdpoff, enum sdp_header_types type, enum sdp_header_types term, const union nf_inet_addr *addr) __read_mostly
 
unsigned int(* nf_nat_sdp_port_hook )(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, unsigned int matchoff, unsigned int matchlen, u_int16_t port) __read_mostly
 
unsigned int(* nf_nat_sdp_session_hook )(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, unsigned int sdpoff, const union nf_inet_addr *addr) __read_mostly
 
unsigned int(* nf_nat_sdp_media_hook )(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, struct nf_conntrack_expect *rtp_exp, struct nf_conntrack_expect *rtcp_exp, unsigned int mediaoff, unsigned int medialen, union nf_inet_addr *rtp_addr) __read_mostly
 

Macro Definition Documentation

#define MAX_PORTS   8

Definition at line 35 of file nf_conntrack_sip.c.

Function Documentation

int ct_sip_get_header ( const struct nf_conn ct,
const char dptr,
unsigned int  dataoff,
unsigned int  datalen,
enum sip_header_types  type,
unsigned int matchoff,
unsigned int matchlen 
)

Definition at line 417 of file nf_conntrack_sip.c.

int ct_sip_get_sdp_header ( const struct nf_conn ct,
const char dptr,
unsigned int  dataoff,
unsigned int  datalen,
enum sdp_header_types  type,
enum sdp_header_types  term,
unsigned int matchoff,
unsigned int matchlen 
)

Definition at line 777 of file nf_conntrack_sip.c.

int ct_sip_parse_address_param ( const struct nf_conn ct,
const char dptr,
unsigned int  dataoff,
unsigned int  datalen,
const char name,
unsigned int matchoff,
unsigned int matchlen,
union nf_inet_addr addr,
bool  delim 
)

Definition at line 616 of file nf_conntrack_sip.c.

int ct_sip_parse_header_uri ( const struct nf_conn ct,
const char dptr,
unsigned int dataoff,
unsigned int  datalen,
enum sip_header_types  type,
int in_header,
unsigned int matchoff,
unsigned int matchlen,
union nf_inet_addr addr,
__be16 port 
)

Definition at line 555 of file nf_conntrack_sip.c.

int ct_sip_parse_numerical_param ( const struct nf_conn ct,
const char dptr,
unsigned int  dataoff,
unsigned int  datalen,
const char name,
unsigned int matchoff,
unsigned int matchlen,
unsigned int val 
)

Definition at line 643 of file nf_conntrack_sip.c.

int ct_sip_parse_request ( const struct nf_conn ct,
const char dptr,
unsigned int  datalen,
unsigned int matchoff,
unsigned int matchlen,
union nf_inet_addr addr,
__be16 port 
)

Definition at line 286 of file nf_conntrack_sip.c.

EXPORT_SYMBOL_GPL ( nf_nat_sip_hook  )
EXPORT_SYMBOL_GPL ( nf_nat_sip_seq_adjust_hook  )
EXPORT_SYMBOL_GPL ( nf_nat_sip_expect_hook  )
EXPORT_SYMBOL_GPL ( nf_nat_sdp_addr_hook  )
EXPORT_SYMBOL_GPL ( nf_nat_sdp_port_hook  )
EXPORT_SYMBOL_GPL ( nf_nat_sdp_session_hook  )
EXPORT_SYMBOL_GPL ( nf_nat_sdp_media_hook  )
EXPORT_SYMBOL_GPL ( ct_sip_parse_request  )
EXPORT_SYMBOL_GPL ( ct_sip_get_header  )
EXPORT_SYMBOL_GPL ( ct_sip_parse_header_uri  )
EXPORT_SYMBOL_GPL ( ct_sip_parse_address_param  )
EXPORT_SYMBOL_GPL ( ct_sip_parse_numerical_param  )
EXPORT_SYMBOL_GPL ( ct_sip_get_sdp_header  )
MODULE_ALIAS ( "ip_conntrack_sip"  )
MODULE_ALIAS_NFCT_HELPER ( "sip"  )
MODULE_AUTHOR ( "Christian Hentschel <chentschel@arnet.com.ar>"  )
MODULE_DESCRIPTION ( "SIP connection tracking helper"  )
module_exit ( nf_conntrack_sip_fini  )
module_init ( nf_conntrack_sip_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( sip_timeout  ,
uint  ,
0600   
)
module_param ( sip_direct_signalling  ,
int  ,
0600   
)
module_param ( sip_direct_media  ,
int  ,
0600   
)
module_param_array ( ports  ,
ushort  ,
ports_c,
0400   
)
MODULE_PARM_DESC ( ports  ,
"port numbers of SIP servers"   
)
MODULE_PARM_DESC ( sip_timeout  ,
"timeout for the master SIP session"   
)
MODULE_PARM_DESC ( sip_direct_signalling  ,
"expect incoming calls from registrar ""only (default 1)"   
)
MODULE_PARM_DESC ( sip_direct_media  ,
"Expect Media streams between signalling ""endpoints only (default 1)"   
)

Variable Documentation

unsigned int(* nf_nat_sdp_addr_hook)(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, unsigned int sdpoff, enum sdp_header_types type, enum sdp_header_types term, const union nf_inet_addr *addr) __read_mostly

Definition at line 74 of file nf_conntrack_sip.c.

unsigned int(* nf_nat_sdp_media_hook)(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, struct nf_conntrack_expect *rtp_exp, struct nf_conntrack_expect *rtcp_exp, unsigned int mediaoff, unsigned int medialen, union nf_inet_addr *rtp_addr) __read_mostly

Definition at line 104 of file nf_conntrack_sip.c.

unsigned int(* nf_nat_sdp_port_hook)(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, unsigned int matchoff, unsigned int matchlen, u_int16_t port) __read_mostly

Definition at line 85 of file nf_conntrack_sip.c.

unsigned int(* nf_nat_sdp_session_hook)(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, unsigned int sdpoff, const union nf_inet_addr *addr) __read_mostly

Definition at line 94 of file nf_conntrack_sip.c.

unsigned int(* nf_nat_sip_expect_hook)(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen, struct nf_conntrack_expect *exp, unsigned int matchoff, unsigned int matchlen) __read_mostly

Definition at line 64 of file nf_conntrack_sip.c.

unsigned int(* nf_nat_sip_hook)(struct sk_buff *skb, unsigned int protoff, unsigned int dataoff, const char **dptr, unsigned int *datalen) __read_mostly

Definition at line 55 of file nf_conntrack_sip.c.

void(* nf_nat_sip_seq_adjust_hook)(struct sk_buff *skb, unsigned int protoff, s16 off) __read_mostly

Definition at line 60 of file nf_conntrack_sip.c.