diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2008-01-31 07:50:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-31 22:28:08 -0500 |
commit | 13f7d63c2911c9d1a254d13899986fc801641127 (patch) | |
tree | 65dc3e2389c12d4cc20af41b77f72082166a8d10 /net | |
parent | 905e3e8ec5899ae618846c9ac6f38dd6c22e604e (diff) |
[NETFILTER]: nf_{conntrack,nat}_sip: annotate SIP helper with const
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_sip.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 25 |
2 files changed, 15 insertions, 14 deletions
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c index 606a170bf4ca..b4c8d4968bb2 100644 --- a/net/ipv4/netfilter/nf_nat_sip.c +++ b/net/ipv4/netfilter/nf_nat_sip.c | |||
@@ -35,9 +35,9 @@ struct addr_map { | |||
35 | } addr[IP_CT_DIR_MAX]; | 35 | } addr[IP_CT_DIR_MAX]; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | static void addr_map_init(struct nf_conn *ct, struct addr_map *map) | 38 | static void addr_map_init(const struct nf_conn *ct, struct addr_map *map) |
39 | { | 39 | { |
40 | struct nf_conntrack_tuple *t; | 40 | const struct nf_conntrack_tuple *t; |
41 | enum ip_conntrack_dir dir; | 41 | enum ip_conntrack_dir dir; |
42 | unsigned int n; | 42 | unsigned int n; |
43 | 43 | ||
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 775f7d468105..c521c891d351 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -48,10 +48,10 @@ unsigned int (*nf_nat_sdp_hook)(struct sk_buff *skb, | |||
48 | const char *dptr) __read_mostly; | 48 | const char *dptr) __read_mostly; |
49 | EXPORT_SYMBOL_GPL(nf_nat_sdp_hook); | 49 | EXPORT_SYMBOL_GPL(nf_nat_sdp_hook); |
50 | 50 | ||
51 | static int digits_len(struct nf_conn *, const char *, const char *, int *); | 51 | static int digits_len(const struct nf_conn *, const char *, const char *, int *); |
52 | static int epaddr_len(struct nf_conn *, const char *, const char *, int *); | 52 | static int epaddr_len(const struct nf_conn *, const char *, const char *, int *); |
53 | static int skp_digits_len(struct nf_conn *, const char *, const char *, int *); | 53 | static int skp_digits_len(const struct nf_conn *, const char *, const char *, int *); |
54 | static int skp_epaddr_len(struct nf_conn *, const char *, const char *, int *); | 54 | static int skp_epaddr_len(const struct nf_conn *, const char *, const char *, int *); |
55 | 55 | ||
56 | struct sip_header_nfo { | 56 | struct sip_header_nfo { |
57 | const char *lname; | 57 | const char *lname; |
@@ -61,7 +61,7 @@ struct sip_header_nfo { | |||
61 | size_t snlen; | 61 | size_t snlen; |
62 | size_t ln_strlen; | 62 | size_t ln_strlen; |
63 | int case_sensitive; | 63 | int case_sensitive; |
64 | int (*match_len)(struct nf_conn *, const char *, | 64 | int (*match_len)(const struct nf_conn *, const char *, |
65 | const char *, int *); | 65 | const char *, int *); |
66 | }; | 66 | }; |
67 | 67 | ||
@@ -225,7 +225,7 @@ const char *ct_sip_search(const char *needle, const char *haystack, | |||
225 | } | 225 | } |
226 | EXPORT_SYMBOL_GPL(ct_sip_search); | 226 | EXPORT_SYMBOL_GPL(ct_sip_search); |
227 | 227 | ||
228 | static int digits_len(struct nf_conn *ct, const char *dptr, | 228 | static int digits_len(const struct nf_conn *ct, const char *dptr, |
229 | const char *limit, int *shift) | 229 | const char *limit, int *shift) |
230 | { | 230 | { |
231 | int len = 0; | 231 | int len = 0; |
@@ -237,7 +237,7 @@ static int digits_len(struct nf_conn *ct, const char *dptr, | |||
237 | } | 237 | } |
238 | 238 | ||
239 | /* get digits length, skipping blank spaces. */ | 239 | /* get digits length, skipping blank spaces. */ |
240 | static int skp_digits_len(struct nf_conn *ct, const char *dptr, | 240 | static int skp_digits_len(const struct nf_conn *ct, const char *dptr, |
241 | const char *limit, int *shift) | 241 | const char *limit, int *shift) |
242 | { | 242 | { |
243 | for (; dptr <= limit && *dptr == ' '; dptr++) | 243 | for (; dptr <= limit && *dptr == ' '; dptr++) |
@@ -246,8 +246,9 @@ static int skp_digits_len(struct nf_conn *ct, const char *dptr, | |||
246 | return digits_len(ct, dptr, limit, shift); | 246 | return digits_len(ct, dptr, limit, shift); |
247 | } | 247 | } |
248 | 248 | ||
249 | static int parse_addr(struct nf_conn *ct, const char *cp, const char **endp, | 249 | static int parse_addr(const struct nf_conn *ct, const char *cp, |
250 | union nf_inet_addr *addr, const char *limit) | 250 | const char **endp, union nf_inet_addr *addr, |
251 | const char *limit) | ||
251 | { | 252 | { |
252 | const char *end; | 253 | const char *end; |
253 | int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; | 254 | int family = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; |
@@ -272,7 +273,7 @@ static int parse_addr(struct nf_conn *ct, const char *cp, const char **endp, | |||
272 | } | 273 | } |
273 | 274 | ||
274 | /* skip ip address. returns its length. */ | 275 | /* skip ip address. returns its length. */ |
275 | static int epaddr_len(struct nf_conn *ct, const char *dptr, | 276 | static int epaddr_len(const struct nf_conn *ct, const char *dptr, |
276 | const char *limit, int *shift) | 277 | const char *limit, int *shift) |
277 | { | 278 | { |
278 | union nf_inet_addr addr; | 279 | union nf_inet_addr addr; |
@@ -292,7 +293,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr, | |||
292 | } | 293 | } |
293 | 294 | ||
294 | /* get address length, skiping user info. */ | 295 | /* get address length, skiping user info. */ |
295 | static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, | 296 | static int skp_epaddr_len(const struct nf_conn *ct, const char *dptr, |
296 | const char *limit, int *shift) | 297 | const char *limit, int *shift) |
297 | { | 298 | { |
298 | const char *start = dptr; | 299 | const char *start = dptr; |
@@ -319,7 +320,7 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, | |||
319 | } | 320 | } |
320 | 321 | ||
321 | /* Returns 0 if not found, -1 error parsing. */ | 322 | /* Returns 0 if not found, -1 error parsing. */ |
322 | int ct_sip_get_info(struct nf_conn *ct, | 323 | int ct_sip_get_info(const struct nf_conn *ct, |
323 | const char *dptr, size_t dlen, | 324 | const char *dptr, size_t dlen, |
324 | unsigned int *matchoff, | 325 | unsigned int *matchoff, |
325 | unsigned int *matchlen, | 326 | unsigned int *matchlen, |