[NETFILTER]: nf_conntrack_sip: introduce URI and header parameter parsing helpers
Introduce URI and header parameter parsing helpers. These are needed by the conntrack helper to parse expiration values in Contact: header parameters and by the NAT helper to properly update the Via-header rport=, received= and maddr= parameters. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9467ee380a
commit
2bbb21168a
2 changed files with 68 additions and 0 deletions
|
@ -93,6 +93,16 @@ extern int ct_sip_parse_header_uri(const struct nf_conn *ct, const char *dptr,
|
|||
enum sip_header_types type, int *in_header,
|
||||
unsigned int *matchoff, unsigned int *matchlen,
|
||||
union nf_inet_addr *addr, __be16 *port);
|
||||
extern 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);
|
||||
extern int ct_sip_parse_numerical_param(const struct nf_conn *ct, const char *dptr,
|
||||
unsigned int off, unsigned int datalen,
|
||||
const char *name,
|
||||
unsigned int *matchoff, unsigned int *matchen,
|
||||
unsigned int *val);
|
||||
|
||||
extern int ct_sip_get_sdp_header(const struct nf_conn *ct, const char *dptr,
|
||||
unsigned int dataoff, unsigned int datalen,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue