This source file includes following definitions.
- proc_net_register
- proc_net_unregister
1 #ifndef _LINUX_PROC_FS_H
2 #define _LINUX_PROC_FS_H
3
4 #include <linux/config.h>
5 #include <linux/fs.h>
6
7
8
9
10
11
12
13
14
15 enum root_directory_inos {
16 PROC_ROOT_INO = 1,
17 PROC_LOADAVG,
18 PROC_UPTIME,
19 PROC_MEMINFO,
20 PROC_KMSG,
21 PROC_VERSION,
22 PROC_CPUINFO,
23 PROC_PCI,
24 PROC_SELF,
25 PROC_NET,
26 PROC_SCSI,
27 PROC_MALLOC,
28 PROC_KCORE,
29 PROC_MODULES,
30 PROC_STAT,
31 PROC_DEVICES,
32 PROC_INTERRUPTS,
33 PROC_FILESYSTEMS,
34 PROC_KSYMS,
35 PROC_DMA,
36 PROC_IOPORTS,
37 PROC_PROFILE
38 };
39
40 enum pid_directory_inos {
41 PROC_PID_INO = 2,
42 PROC_PID_MEM,
43 PROC_PID_CWD,
44 PROC_PID_ROOT,
45 PROC_PID_EXE,
46 PROC_PID_FD,
47 PROC_PID_ENVIRON,
48 PROC_PID_CMDLINE,
49 PROC_PID_STAT,
50 PROC_PID_STATM,
51 PROC_PID_MAPS
52 };
53
54 enum pid_subdirectory_inos {
55 PROC_PID_FD_DIR = 1
56 };
57
58 enum net_directory_inos {
59 PROC_NET_UNIX = 128,
60 PROC_NET_ARP,
61 PROC_NET_ROUTE,
62 PROC_NET_DEV,
63 PROC_NET_RAW,
64 PROC_NET_TCP,
65 PROC_NET_UDP,
66 PROC_NET_SNMP,
67 PROC_NET_RARP,
68 PROC_NET_IGMP,
69 PROC_NET_IPFWFWD,
70 PROC_NET_IPFWBLK,
71 PROC_NET_IPACCT,
72 PROC_NET_IPMSQHST,
73 PROC_NET_WAVELAN,
74 PROC_NET_IPX_INTERFACE,
75 PROC_NET_IPX_ROUTE,
76 PROC_NET_IPX,
77 PROC_NET_ATALK,
78 PROC_NET_AT_ROUTE,
79 PROC_NET_ATIF,
80 PROC_NET_AX25_ROUTE,
81 PROC_NET_AX25,
82 PROC_NET_AX25_CALLS,
83 PROC_NET_NR_NODES,
84 PROC_NET_NR_NEIGH,
85 PROC_NET_NR,
86 PROC_NET_SOCKSTAT,
87 PROC_NET_LAST
88 };
89
90 enum scsi_directory_inos {
91 PROC_SCSI_SCSI = 256,
92 PROC_SCSI_EATA,
93 PROC_SCSI_EATA_PIO,
94 PROC_SCSI_AHA152X,
95 PROC_SCSI_AHA1542,
96 PROC_SCSI_AHA1740,
97 PROC_SCSI_AIC7XXX,
98 PROC_SCSI_BUSLOGIC,
99 PROC_SCSI_U14_34F,
100 PROC_SCSI_FUTURE_DOMAIN,
101 PROC_SCSI_GENERIC_NCR5380,
102 PROC_SCSI_IN2000,
103 PROC_SCSI_PAS16,
104 PROC_SCSI_QLOGIC,
105 PROC_SCSI_SEAGATE,
106 PROC_SCSI_T128,
107 PROC_SCSI_NCR53C7xx,
108 PROC_SCSI_ULTRASTOR,
109 PROC_SCSI_7000FASST,
110 PROC_SCSI_EATA2X,
111 PROC_SCSI_SCSI_DEBUG,
112 PROC_SCSI_NOT_PRESENT,
113 PROC_SCSI_FILE,
114 PROC_SCSI_LAST = (PROC_SCSI_FILE + 16)
115 };
116
117 #define PROC_SUPER_MAGIC 0x9fa0
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134 struct proc_dir_entry {
135 unsigned short low_ino;
136 unsigned short namelen;
137 const char *name;
138 mode_t mode;
139 nlink_t nlink;
140 uid_t uid;
141 gid_t gid;
142 unsigned long size;
143 struct inode_operations * ops;
144 int (*get_info)(char *, char **, off_t, int, int);
145 void (*fill_inode)(struct inode *);
146 struct proc_dir_entry *next, *parent, *subdir;
147 };
148
149 extern struct proc_dir_entry proc_root;
150 extern struct proc_dir_entry proc_net;
151 extern struct proc_dir_entry proc_scsi;
152 extern struct proc_dir_entry proc_pid;
153 extern struct proc_dir_entry proc_pid_fd;
154
155 extern void proc_root_init(void);
156 extern void proc_base_init(void);
157 extern void proc_net_init(void);
158
159 extern int proc_register(struct proc_dir_entry *, struct proc_dir_entry *);
160 extern int proc_unregister(struct proc_dir_entry *, int);
161
162 static inline int proc_net_register(struct proc_dir_entry * x)
163 {
164 return proc_register(&proc_net, x);
165 }
166
167 static inline int proc_net_unregister(int x)
168 {
169 return proc_unregister(&proc_net, x);
170 }
171
172 extern struct super_block *proc_read_super(struct super_block *,void *,int);
173 extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *);
174 extern void proc_statfs(struct super_block *, struct statfs *, int);
175 extern void proc_read_inode(struct inode *);
176 extern void proc_write_inode(struct inode *);
177 extern int proc_match(int, const char *, struct proc_dir_entry *);
178
179
180
181
182
183
184
185
186 extern int proc_readdir(struct inode *, struct file *, void *, filldir_t);
187 extern int proc_lookup(struct inode *, const char *, int, struct inode **);
188
189 extern struct inode_operations proc_base_inode_operations;
190 extern struct inode_operations proc_net_inode_operations;
191 extern struct inode_operations proc_netdir_inode_operations;
192 extern struct inode_operations proc_scsi_inode_operations;
193 extern struct inode_operations proc_mem_inode_operations;
194 extern struct inode_operations proc_array_inode_operations;
195 extern struct inode_operations proc_arraylong_inode_operations;
196 extern struct inode_operations proc_kcore_inode_operations;
197 extern struct inode_operations proc_profile_inode_operations;
198 extern struct inode_operations proc_kmsg_inode_operations;
199 extern struct inode_operations proc_link_inode_operations;
200 extern struct inode_operations proc_fd_inode_operations;
201
202 #endif