1 --- libnfnetlink-1.0.1.orig/src/libnfnetlink.c 2012-08-13 19:56:29.000000000 +0200
2 +++ libnfnetlink-1.0.1/src/libnfnetlink.c 2014-04-10 07:37:41.000000000 +0200
13 struct nfnl_subsys_handle {
14 struct nfnl_handle *nfnlh;
15 - u_int32_t subscriptions;
18 + uint32_t subscriptions;
21 struct nfnl_callback *cb; /* array of callbacks */
24 @@ -86,11 +87,11 @@ struct nfnl_handle {
26 struct sockaddr_nl local;
27 struct sockaddr_nl peer;
28 - u_int32_t subscriptions;
31 - u_int32_t rcv_buffer_size; /* for nfnl_catch */
33 + uint32_t subscriptions;
36 + uint32_t rcv_buffer_size; /* for nfnl_catch */
38 struct nlmsghdr *last_nlhdr;
39 struct nfnl_subsys_handle subsys[NFNL_MAX_SUBSYS+1];
41 @@ -145,7 +146,7 @@ unsigned int nfnl_portid(const struct nf
42 static int recalc_rebind_subscriptions(struct nfnl_handle *nfnlh)
45 - u_int32_t new_subscriptions = nfnlh->subscriptions;
46 + uint32_t new_subscriptions = nfnlh->subscriptions;
48 for (i = 0; i < NFNL_MAX_SUBSYS; i++)
49 new_subscriptions |= nfnlh->subsys[i].subscriptions;
50 @@ -273,8 +274,8 @@ void nfnl_set_rcv_buffer_size(struct nfn
51 * a valid address that points to a nfnl_subsys_handle structure is returned.
53 struct nfnl_subsys_handle *
54 -nfnl_subsys_open(struct nfnl_handle *nfnlh, u_int8_t subsys_id,
55 - u_int8_t cb_count, u_int32_t subscriptions)
56 +nfnl_subsys_open(struct nfnl_handle *nfnlh, uint8_t subsys_id,
57 + uint8_t cb_count, uint32_t subscriptions)
59 struct nfnl_subsys_handle *ssh;
61 @@ -435,10 +436,10 @@ int nfnl_sendiov(const struct nfnl_handl
63 void nfnl_fill_hdr(struct nfnl_subsys_handle *ssh,
64 struct nlmsghdr *nlh, unsigned int len,
68 - u_int16_t msg_flags)
76 @@ -848,14 +849,14 @@ int nfnl_nfa_addattr_l(struct nfattr *nf
80 - * nfnl_addattr8 - Add u_int8_t attribute to nlmsghdr
81 + * nfnl_addattr8 - Add uint8_t attribute to nlmsghdr
83 * @n: netlink message header to which attribute is to be added
84 * @maxlen: maximum length of netlink message header
85 * @type: type of new attribute
86 * @data: content of new attribute
88 -int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, u_int8_t data)
89 +int nfnl_addattr8(struct nlmsghdr *n, int maxlen, int type, uint8_t data)
93 @@ -865,7 +866,7 @@ int nfnl_addattr8(struct nlmsghdr *n, in
97 - * nfnl_nfa_addattr16 - Add u_int16_t attribute to struct nfattr
98 + * nfnl_nfa_addattr16 - Add uint16_t attribute to struct nfattr
100 * @nfa: struct nfattr
101 * @maxlen: maximal length of nfattr buffer
102 @@ -874,7 +875,7 @@ int nfnl_addattr8(struct nlmsghdr *n, in
105 int nfnl_nfa_addattr16(struct nfattr *nfa, int maxlen, int type,
111 @@ -884,7 +885,7 @@ int nfnl_nfa_addattr16(struct nfattr *nf
115 - * nfnl_addattr16 - Add u_int16_t attribute to nlmsghdr
116 + * nfnl_addattr16 - Add uint16_t attribute to nlmsghdr
118 * @n: netlink message header to which attribute is to be added
119 * @maxlen: maximum length of netlink message header
120 @@ -893,7 +894,7 @@ int nfnl_nfa_addattr16(struct nfattr *nf
123 int nfnl_addattr16(struct nlmsghdr *n, int maxlen, int type,
129 @@ -903,7 +904,7 @@ int nfnl_addattr16(struct nlmsghdr *n, i
133 - * nfnl_nfa_addattr32 - Add u_int32_t attribute to struct nfattr
134 + * nfnl_nfa_addattr32 - Add uint32_t attribute to struct nfattr
136 * @nfa: struct nfattr
137 * @maxlen: maximal length of nfattr buffer
138 @@ -912,7 +913,7 @@ int nfnl_addattr16(struct nlmsghdr *n, i
141 int nfnl_nfa_addattr32(struct nfattr *nfa, int maxlen, int type,
147 @@ -922,7 +923,7 @@ int nfnl_nfa_addattr32(struct nfattr *nf
151 - * nfnl_addattr32 - Add u_int32_t attribute to nlmsghdr
152 + * nfnl_addattr32 - Add uint32_t attribute to nlmsghdr
154 * @n: netlink message header to which attribute is to be added
155 * @maxlen: maximum length of netlink message header
156 @@ -931,7 +932,7 @@ int nfnl_nfa_addattr32(struct nfattr *nf
159 int nfnl_addattr32(struct nlmsghdr *n, int maxlen, int type,
165 @@ -979,7 +980,7 @@ int nfnl_parse_attr(struct nfattr *tb[],
168 void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa,
169 - u_int16_t type, u_int32_t len, unsigned char *val)
170 + uint16_t type, uint32_t len, unsigned char *val)
174 @@ -1114,7 +1115,7 @@ struct nlmsghdr *nfnl_get_msg_next(struc
177 int nfnl_callback_register(struct nfnl_subsys_handle *ssh,
178 - u_int8_t type, struct nfnl_callback *cb)
179 + uint8_t type, struct nfnl_callback *cb)
183 @@ -1137,7 +1138,7 @@ int nfnl_callback_register(struct nfnl_s
184 * On sucess, 0 is returned. On error, -1 is returned and errno is
187 -int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, u_int8_t type)
188 +int nfnl_callback_unregister(struct nfnl_subsys_handle *ssh, uint8_t type)
192 @@ -1160,8 +1161,8 @@ int nfnl_check_attributes(const struct n
196 - u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
197 - u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
198 + uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
199 + uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
200 const struct nfnl_subsys_handle *ssh;
201 struct nfnl_callback *cb;
203 @@ -1211,8 +1212,8 @@ static int __nfnl_handle_msg(struct nfnl
206 struct nfnl_subsys_handle *ssh;
207 - u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
208 - u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
209 + uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
210 + uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
213 if (subsys_id > NFNL_MAX_SUBSYS)
214 @@ -1242,7 +1243,7 @@ int nfnl_handle_packet(struct nfnl_handl
217 while (len >= NLMSG_SPACE(0)) {
220 struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
222 if (nlh->nlmsg_len < sizeof(struct nlmsghdr)
223 @@ -1284,8 +1285,8 @@ static int nfnl_is_error(struct nfnl_han
224 static int nfnl_step(struct nfnl_handle *h, struct nlmsghdr *nlh)
226 struct nfnl_subsys_handle *ssh;
227 - u_int8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
228 - u_int8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
229 + uint8_t type = NFNL_MSG_TYPE(nlh->nlmsg_type);
230 + uint8_t subsys_id = NFNL_SUBSYS_ID(nlh->nlmsg_type);
232 /* Is this an error message? */
233 if (nfnl_is_error(h, nlh)) {