summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2012-09-13 00:40:35 +0300
committerRoman Yeryomin <roman@advem.lv>2012-12-03 00:13:21 +0200
commit5deb3317cb51ac52de922bb55f8492624018906d (patch)
treec2fbe6346699d9bb0f2100490c3029519bb8fde8 /target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h
parent0239d37124f9184b478a42de8a7fa1bc85a6a6fe (diff)
Add realtek target files
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h')
-rw-r--r--target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h b/target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h
new file mode 100644
index 000000000..c648df3f2
--- /dev/null
+++ b/target/linux/realtek/files/include/net/rtl/rtl865x_igmpsnooping_glue.h
@@ -0,0 +1,113 @@
+/*
+* Copyright c Realsil Semiconductor Corporation, 2006
+* All rights reserved.
+*
+* Program : IGMP glue file
+* Abstract :
+* Author :qinjunjie
+* Email:qinjunjie1980@hotmail.com
+*
+*/
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef SUCCESS
+#define SUCCESS 0
+#endif
+
+#ifndef FAILED
+#define FAILED -1
+#endif
+
+
+#if 0
+#ifndef _RTL_TYPES_H
+typedef unsigned int uint32;
+typedef int int32;
+typedef unsigned short uint16;
+typedef short int16;
+typedef unsigned char uint8;
+typedef char int8;
+#endif
+#else
+#include "rtl_types.h"
+#endif
+
+#ifndef RTL_MULTICAST_SNOOPING_GLUE
+#define RTL_MULTICAST_SNOOPING_GLUE
+
+
+#define swapl32(x)\
+ ((((x) & 0xff000000U) >> 24) | \
+ (((x) & 0x00ff0000U) >> 8) | \
+ (((x) & 0x0000ff00U) << 8) | \
+ (((x) & 0x000000ffU) << 24))
+#define swaps16(x) \
+ ((((x) & 0xff00) >> 8) | \
+ (((x) & 0x00ff) << 8))
+
+#ifdef _LITTLE_ENDIAN
+
+#ifndef ntohs
+ #define ntohs(x) (swaps16(x))
+#endif
+
+#ifndef ntohl
+ #define ntohl(x) (swapl32(x))
+#endif
+
+#ifndef htons
+ #define htons(x) (swaps16(x))
+#endif
+
+#ifndef htonl
+ #define htonl(x) (swapl32(x))
+#endif
+
+#else
+
+#ifndef ntohs
+ #define ntohs(x) (x)
+#endif
+
+#ifndef ntohl
+ #define ntohl(x) (x)
+#endif
+
+#ifndef htons
+ #define htons(x) (x)
+#endif
+
+#ifndef htonl
+ #define htonl(x) (x)
+#endif
+
+#endif
+
+#ifdef __KERNEL__
+ #define rtl_gluePrintf printk
+#else
+ #define rtl_gluePrintf printf
+#endif
+
+
+void *rtl_glueMalloc(uint32 NBYTES);
+void rtl_glueFree(void *memblock);
+
+void rtl_glueMutexLock(void);
+void rtl_glueMutexUnlock(void);
+
+#endif
+
+
+