summaryrefslogtreecommitdiffstats
path: root/libipq
diff options
context:
space:
mode:
Diffstat (limited to 'libipq')
-rw-r--r--libipq/ipq_create_handle.32
-rw-r--r--libipq/libipq.32
-rw-r--r--libipq/libipq.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/libipq/ipq_create_handle.3 b/libipq/ipq_create_handle.3
index c833e884..78402776 100644
--- a/libipq/ipq_create_handle.3
+++ b/libipq/ipq_create_handle.3
@@ -46,7 +46,7 @@ for forward compatibility.
The
.I protocol
parameter is used to specify the protocol of the packets to be queued.
-Valid values are PF_INET for IPv4 and PF_INET6 for IPv6. Currently,
+Valid values are NFPROTO_IPV4 for IPv4 and NFPROTO_IPV6 for IPv6. Currently,
only one protocol may be queued at a time for a handle.
.PP
The
diff --git a/libipq/libipq.3 b/libipq/libipq.3
index c2295c1d..9dafa4a8 100644
--- a/libipq/libipq.3
+++ b/libipq/libipq.3
@@ -187,7 +187,7 @@ int main(int argc, char **argv)
unsigned char buf[BUFSIZE];
struct ipq_handle *h;
- h = ipq_create_handle(0, PF_INET);
+ h = ipq_create_handle(0, NFPROTO_IPV4);
if (!h)
die(h);
diff --git a/libipq/libipq.c b/libipq/libipq.c
index 658af975..495fce16 100644
--- a/libipq/libipq.c
+++ b/libipq/libipq.c
@@ -217,9 +217,9 @@ struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t protocol)
memset(h, 0, sizeof(struct ipq_handle));
- if (protocol == PF_INET)
+ if (protocol == NFPROTO_IPV4)
h->fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_FIREWALL);
- else if (protocol == PF_INET6)
+ else if (protocol == NFPROTO_IPV6)
h->fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_IP6_FW);
else {
ipq_errno = IPQ_ERR_PROTOCOL;