[netfilter-cvslog] r3615 - trunk/nfsim/kernelenv/include
rusty at netfilter.org
rusty at netfilter.org
Tue Jan 25 05:51:03 CET 2005
Author: rusty at netfilter.org
Date: 2005-01-25 05:50:58 +0100 (Tue, 25 Jan 2005)
New Revision: 3615
Modified:
trunk/nfsim/kernelenv/include/kernelenv.h
Log:
More struct sock fields for LOG in 2.6.11-rc2
Modified: trunk/nfsim/kernelenv/include/kernelenv.h
===================================================================
--- trunk/nfsim/kernelenv/include/kernelenv.h 2005-01-25 04:49:57 UTC (rev 3614)
+++ trunk/nfsim/kernelenv/include/kernelenv.h 2005-01-25 04:50:58 UTC (rev 3615)
@@ -343,6 +343,77 @@
(pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next))
+/* spinlock.h */
+
+/* no difference between spin and rw locks at present */
+
+typedef struct {
+ volatile int lock;
+ char *location;
+} spinlock_t;
+
+typedef spinlock_t rwlock_t;
+
+#define RW_LOCK_UNLOCKED (rwlock_t) { 0, NULL }
+#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0, NULL }
+#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
+#define DEFINE_RWLOCK(x) rwlock_t x = RW_LOCK_UNLOCKED
+
+#define spin_lock_init(x) \
+ do { \
+ (x)->lock = 0; \
+ (x)->location = NULL; \
+ } while (0)
+
+#define rwlock_init(x) spin_lock_init(x)
+
+
+#define spin_lock(x) __generic_write_lock((x), __location__)
+#define spin_unlock(x) __generic_write_unlock((x), __location__)
+
+#define spin_lock_bh(x) __generic_write_lock((x), __location__)
+#define spin_unlock_bh(x) __generic_write_unlock((x), __location__)
+
+#define spin_lock_irq(x) __generic_write_lock((x), __location__)
+#define spin_unlock_irq(x) __generic_write_unlock((x), __location__)
+
+#define spin_lock_irqsave(x,f) __generic_write_lock((x), __location__); f++
+#define spin_unlock_irqrestore(x,f) __generic_write_unlock((x), __location__); f--
+
+#define read_lock_bh(x) __generic_read_lock((x), __location__)
+#define read_unlock_bh(x) __generic_read_unlock((x), __location__)
+
+#define read_lock(x) __generic_read_lock((x), __location__)
+#define read_unlock(x) __generic_read_unlock((x), __location__)
+
+#define write_lock_bh(x) __generic_write_lock((x), __location__)
+#define write_unlock_bh(x) __generic_write_unlock((x), __location__)
+
+#define rcu_read_lock()
+#define rcu_read_unlock()
+
+#define rcu_dereference(p) (p)
+#define rcu_assign_pointer(p, v) ({ \
+ smp_wmb(); \
+ (p) = (v); \
+ })
+
+void __generic_read_lock(spinlock_t *lock, const char *location);
+void __generic_read_unlock(spinlock_t *lock, const char *location);
+
+void __generic_write_lock(spinlock_t *lock, const char *location);
+void __generic_write_unlock(spinlock_t *lock, const char *location);
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+/* brlock.h */
+#define br_write_lock_bh(lock)
+#define br_write_unlock_bh(lock)
+#define br_write_lock(lock)
+#define br_write_unlock(lock)
+#define br_read_lock_bh(lock)
+#define br_read_unlock_bh(lock)
+#endif
+
/* vsprintf.h */
unsigned long int strtoul(const char *nptr, char **endptr, int base);
#define simple_strtoul strtoul
@@ -631,6 +702,17 @@
atomic_t skc_refcnt;
};
+/* LOG wants to log UID... sk_socket pointer is NULL, but needs to compile */
+struct socket_file_dummy
+{
+ unsigned int f_uid;
+};
+
+struct socket
+{
+ struct socket_file_dummy *file;
+};
+
struct sock {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
atomic_t sk_refcnt;
@@ -649,6 +731,8 @@
#define sk_bind_node __sk_common.skc_bind_node
#define sk_refcnt __sk_common.skc_refcnt
+ rwlock_t sk_callback_lock;
+ struct socket *sk_socket;
struct proto *sk_prot;
#endif
@@ -855,76 +939,6 @@
int dst_input(struct sk_buff *skb);
-/* spinlock.h */
-
-/* no difference between spin and rw locks at present */
-
-typedef struct {
- volatile int lock;
- char *location;
-} spinlock_t;
-
-typedef spinlock_t rwlock_t;
-
-#define RW_LOCK_UNLOCKED (rwlock_t) { 0, NULL }
-#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0, NULL }
-#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
-
-#define spin_lock_init(x) \
- do { \
- (x)->lock = 0; \
- (x)->location = NULL; \
- } while (0)
-
-#define rwlock_init(x) spin_lock_init(x)
-
-
-#define spin_lock(x) __generic_write_lock((x), __location__)
-#define spin_unlock(x) __generic_write_unlock((x), __location__)
-
-#define spin_lock_bh(x) __generic_write_lock((x), __location__)
-#define spin_unlock_bh(x) __generic_write_unlock((x), __location__)
-
-#define spin_lock_irq(x) __generic_write_lock((x), __location__)
-#define spin_unlock_irq(x) __generic_write_unlock((x), __location__)
-
-#define spin_lock_irqsave(x,f) __generic_write_lock((x), __location__); f++
-#define spin_unlock_irqrestore(x,f) __generic_write_unlock((x), __location__); f--
-
-#define read_lock_bh(x) __generic_read_lock((x), __location__)
-#define read_unlock_bh(x) __generic_read_unlock((x), __location__)
-
-#define read_lock(x) __generic_read_lock((x), __location__)
-#define read_unlock(x) __generic_read_unlock((x), __location__)
-
-#define write_lock_bh(x) __generic_write_lock((x), __location__)
-#define write_unlock_bh(x) __generic_write_unlock((x), __location__)
-
-#define rcu_read_lock()
-#define rcu_read_unlock()
-
-#define rcu_dereference(p) (p)
-#define rcu_assign_pointer(p, v) ({ \
- smp_wmb(); \
- (p) = (v); \
- })
-
-void __generic_read_lock(spinlock_t *lock, const char *location);
-void __generic_read_unlock(spinlock_t *lock, const char *location);
-
-void __generic_write_lock(spinlock_t *lock, const char *location);
-void __generic_write_unlock(spinlock_t *lock, const char *location);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-/* brlock.h */
-#define br_write_lock_bh(lock)
-#define br_write_unlock_bh(lock)
-#define br_write_lock(lock)
-#define br_write_unlock(lock)
-#define br_read_lock_bh(lock)
-#define br_read_unlock_bh(lock)
-#endif
-
/* semaphore.h */
/* We don't support generic semaphores: we use a simple talloc to track use */
More information about the netfilter-cvslog
mailing list