git://git.onelab.eu
/
ipfw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag ipfw-0.9-8
[ipfw.git]
/
glue.h
diff --git
a/glue.h
b/glue.h
index
bf7043d
..
de0ab23
100644
(file)
--- a/
glue.h
+++ b/
glue.h
@@
-23,7
+23,7
@@
* SUCH DAMAGE.
*/
/*
* SUCH DAMAGE.
*/
/*
- * $Id: glue.h 4
363 2009-12-08 16:06:54Z marta
$
+ * $Id: glue.h 4
661 2010-01-04 11:56:12Z luigi
$
*
* glue code to adapt the FreeBSD version to linux and windows,
* userland and kernel.
*
* glue code to adapt the FreeBSD version to linux and windows,
* userland and kernel.
@@
-241,6
+241,11
@@
int
sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp,
size_t newlen);
sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp,
size_t newlen);
+#ifdef __linux__
+/* linux does not have sin_len in sockaddr, we only remap in userland */
+#define sin_len sin_zero[0]
+#endif /* __linux__ */
+
#else /* KERNEL_MODULE */
/* linux and windows kernel do not have bcopy ? */
#else /* KERNEL_MODULE */
/* linux and windows kernel do not have bcopy ? */
@@
-250,6
+255,11
@@
sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp,
#include <linux/in6.h>
#endif
#include <linux/in6.h>
#endif
+/* skb_dst() was introduced from linux 2.6.31 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) // or 2.4.x
+#define skb_dst(_dummy) skb->dst
+#endif
+
/* definitions useful for the kernel side */
struct route_in6 { };
/* definitions useful for the kernel side */
struct route_in6 { };
@@
-260,6
+270,7
@@
struct route_in6 { };
#define INET_ADDRSTRLEN 16
#define INET_ADDRSTRLEN 16
+
/*
* List of values used for set/getsockopt options.
* The base value on FreeBSD is defined as a macro,
/*
* List of values used for set/getsockopt options.
* The base value on FreeBSD is defined as a macro,