Blame view

include/net/raw.h 1.86 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  /*
   * INET		An implementation of the TCP/IP protocol suite for the LINUX
   *		operating system.  INET is implemented using the  BSD Socket
   *		interface as the means of communication with the user level.
   *
   *		Definitions for the RAW-IP module.
   *
   * Version:	@(#)raw.h	1.0.2	05/07/93
   *
   * Author:	Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
   *
   *		This program is free software; you can redistribute it and/or
   *		modify it under the terms of the GNU General Public License
   *		as published by the Free Software Foundation; either version
   *		2 of the License, or (at your option) any later version.
   */
  #ifndef _RAW_H
  #define _RAW_H
14c850212   Arnaldo Carvalho de Melo   [INET_SOCK]: Move...
19
  #include <net/protocol.h>
f74e49b56   Patrick McHardy   ipv4: raw: move s...
20
  #include <linux/icmp.h>
14c850212   Arnaldo Carvalho de Melo   [INET_SOCK]: Move...
21

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
22
  extern struct proto raw_prot;
7bc54c903   Pavel Emelyanov   [IPv4] RAW: Compa...
23
24
  void raw_icmp_error(struct sk_buff *, int, u32);
  int raw_local_deliver(struct sk_buff *, int);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
25

7bc54c903   Pavel Emelyanov   [IPv4] RAW: Compa...
26
  extern int 	raw_rcv(struct sock *, struct sk_buff *);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
27

b673e4dfc   Pavel Emelyanov   [RAW]: Introduce ...
28
29
30
31
32
33
  #define RAW_HTABLE_SIZE	MAX_INET_PROTOS
  
  struct raw_hashinfo {
  	rwlock_t lock;
  	struct hlist_head ht[RAW_HTABLE_SIZE];
  };
20380731b   Arnaldo Carvalho de Melo   [NET]: Fix sparse...
34
35
36
  #ifdef CONFIG_PROC_FS
  extern int  raw_proc_init(void);
  extern void raw_proc_exit(void);
42a73808e   Pavel Emelyanov   [RAW]: Consolidat...
37
38
  
  struct raw_iter_state {
f51d599fb   Pavel Emelyanov   [NETNS][RAW]: Mak...
39
  	struct seq_net_private p;
42a73808e   Pavel Emelyanov   [RAW]: Consolidat...
40
  	int bucket;
42a73808e   Pavel Emelyanov   [RAW]: Consolidat...
41
42
  	struct raw_hashinfo *h;
  };
e3634169b   Joe Perches   include/net/raw.h...
43
44
45
46
  static inline struct raw_iter_state *raw_seq_private(struct seq_file *seq)
  {
  	return seq->private;
  }
42a73808e   Pavel Emelyanov   [RAW]: Consolidat...
47
48
49
  void *raw_seq_start(struct seq_file *seq, loff_t *pos);
  void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos);
  void raw_seq_stop(struct seq_file *seq, void *v);
3046d7674   Denis V. Lunev   [RAW]: Wrong cont...
50
51
  int raw_seq_open(struct inode *ino, struct file *file,
  		 struct raw_hashinfo *h, const struct seq_operations *ops);
42a73808e   Pavel Emelyanov   [RAW]: Consolidat...
52

20380731b   Arnaldo Carvalho de Melo   [NET]: Fix sparse...
53
  #endif
fc8717baa   Pavel Emelyanov   [RAW]: Add raw_ha...
54
55
  void raw_hash_sk(struct sock *sk);
  void raw_unhash_sk(struct sock *sk);
65b4c50b4   Pavel Emelyanov   [RAW]: Consolidat...
56

f74e49b56   Patrick McHardy   ipv4: raw: move s...
57
58
59
60
  struct raw_sock {
  	/* inet_sock has to be the first member */
  	struct inet_sock   inet;
  	struct icmp_filter filter;
f0ad0860d   Patrick McHardy   ipv4: ipmr: suppo...
61
  	u32		   ipmr_table;
f74e49b56   Patrick McHardy   ipv4: raw: move s...
62
63
64
65
66
67
  };
  
  static inline struct raw_sock *raw_sk(const struct sock *sk)
  {
  	return (struct raw_sock *)sk;
  }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
68
  #endif	/* _RAW_H */