Commit Graph

13 Commits

Author SHA1 Message Date
Thomas Bernard 9885060d5c miniupnpd/bsd/getifstats.c: make it compile with OpenBSD 4.3
see commit 7f6cf3680e
2014-09-15 17:12:31 +02:00
Gleb Smirnoff 7f6cf3680e Use BSD libc API to fetch data about interface statistics instead
of nosing in kernel memory. This API should work on all versions
of FreeBSD/NetBSD/OpenBSD/Dragonfly.

This fixes compilation on FreeBSD 11, where kernel structures
have changed and protects against future breakages. It also
make the file much simplier.

Tested by:	Daniel Engberg <daniel.engberg.lists pyret.net>
2014-09-14 13:41:49 +04:00
Thomas Bernard a310b3a0dc miniupnpd/bsd/ifacewatcher.c: RTM_ADD RTM_DELETE RTM_CHANGE 2014-04-18 10:26:58 +02:00
Thomas Bernard dee1fbe394 miniupnpd/bsd/ifacewatcher.c: add case RTM_GET 2014-04-18 10:12:31 +02:00
Thomas Bernard c4d99670e7 miniupnpd: Use SA_LEN consistently 2014-04-01 11:44:39 +02:00
Thomas Bernard 5a3a670e89 miniupnpd/bsd/getifstats.c: fix for DragonFly BSD
struct ifnet is private to kernel code and is hidden from the userland
code unless you define a macro _KERNEL_STRUCTURES.  Although other people
argue that it should be exposed as it is on other BSDs, that's the way
it is on DragonFly BSD.

Thanks to YONETANI Tomokazu for DragonFly BSD patches
2014-03-19 12:25:52 +01:00
Thomas Bernard 43d3939602 miniupnpd: Implement get_src_for_route_to() for *BSD
Also modify get_src_for_route_to() to return
the network interface index
2013-02-06 15:08:10 +01:00
Thomas Bernard fe37de7e2c Clean signal handling 2012-05-24 18:17:31 +02:00
Thomas Bernard 6fe956229b add static to list[] definition 2012-05-01 22:26:14 +02:00
Thomas Bernard db982e1740 Fully initialize list[] global variable 2012-05-01 11:36:15 +02:00
Shawn Landen 5c224accbf remove trailing whitespace from miniupnpd 2012-02-29 17:48:41 -08:00
Thomas Bernard c07408ef1f Always #include <netinet/in.h> before #include <arpa/inet.h> (for OpenBSD) 2012-01-20 22:55:43 +01:00
Thomas Bernard 0d96346588 Adding miniupnpd 2011-09-28 21:13:20 +02:00