Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdf70832 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: nfnetlink: rename functions containing 'nfattr'



There is no struct nfattr anymore, rename functions to 'nlattr'.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df6fb868
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ struct nfnetlink_subsystem
extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);

#define nfattr_bad_size(tb, max, cta_min)				\
#define nlattr_bad_size(tb, max, cta_min)				\
({	int __i, __res = 0;						\
	for (__i=1; __i <= max; __i++) {					\
 		if (!cta_min[__i])					\
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ struct nf_conntrack_helper

	void (*destroy)(struct nf_conn *ct);

	int (*to_nfattr)(struct sk_buff *skb, const struct nf_conn *ct);
	int (*to_nlattr)(struct sk_buff *skb, const struct nf_conn *ct);
};

extern struct nf_conntrack_helper *
+2 −2
Original line number Diff line number Diff line
@@ -63,10 +63,10 @@ struct nf_conntrack_l3proto
	int (*get_l4proto)(const struct sk_buff *skb, unsigned int nhoff,
			   unsigned int *dataoff, u_int8_t *protonum);

	int (*tuple_to_nfattr)(struct sk_buff *skb,
	int (*tuple_to_nlattr)(struct sk_buff *skb,
			       const struct nf_conntrack_tuple *t);

	int (*nfattr_to_tuple)(struct nlattr *tb[],
	int (*nlattr_to_tuple)(struct nlattr *tb[],
			       struct nf_conntrack_tuple *t);

#ifdef CONFIG_SYSCTL
+6 −6
Original line number Diff line number Diff line
@@ -65,15 +65,15 @@ struct nf_conntrack_l4proto
		     int pf, unsigned int hooknum);

	/* convert protoinfo to nfnetink attributes */
	int (*to_nfattr)(struct sk_buff *skb, struct nlattr *nla,
	int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla,
			 const struct nf_conn *ct);

	/* convert nfnetlink attributes to protoinfo */
	int (*from_nfattr)(struct nlattr *tb[], struct nf_conn *ct);
	int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct);

	int (*tuple_to_nfattr)(struct sk_buff *skb,
	int (*tuple_to_nlattr)(struct sk_buff *skb,
			       const struct nf_conntrack_tuple *t);
	int (*nfattr_to_tuple)(struct nlattr *tb[],
	int (*nlattr_to_tuple)(struct nlattr *tb[],
			       struct nf_conntrack_tuple *t);

#ifdef CONFIG_SYSCTL
@@ -111,9 +111,9 @@ extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);

/* Generic netlink helpers */
extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,
extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
				      const struct nf_conntrack_tuple *tuple);
extern int nf_ct_port_nfattr_to_tuple(struct nlattr *tb[],
extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
				      struct nf_conntrack_tuple *t);

/* Log invalid packets */
+4 −4
Original line number Diff line number Diff line
@@ -38,10 +38,10 @@ struct nf_nat_protocol
			    enum nf_nat_manip_type maniptype,
			    const struct nf_conn *ct);

	int (*range_to_nfattr)(struct sk_buff *skb,
	int (*range_to_nlattr)(struct sk_buff *skb,
			       const struct nf_nat_range *range);

	int (*nfattr_to_range)(struct nlattr *tb[],
	int (*nlattr_to_range)(struct nlattr *tb[],
			       struct nf_nat_range *range);
};

@@ -62,9 +62,9 @@ extern int init_protocols(void) __init;
extern void cleanup_protocols(void);
extern struct nf_nat_protocol *find_nat_proto(u_int16_t protonum);

extern int nf_nat_port_range_to_nfattr(struct sk_buff *skb,
extern int nf_nat_port_range_to_nlattr(struct sk_buff *skb,
				       const struct nf_nat_range *range);
extern int nf_nat_port_nfattr_to_range(struct nlattr *tb[],
extern int nf_nat_port_nlattr_to_range(struct nlattr *tb[],
				       struct nf_nat_range *range);

#endif /*_NF_NAT_PROTO_H*/
Loading