1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Copyright (C) 2002 Cluster File Systems, Inc.
6 * This file is part of Lustre, http://www.lustre.org.
8 * Lustre is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU General Public
10 * License as published by the Free Software Foundation.
12 * Lustre is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Lustre; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Top level header file for LProc SNMP
23 #ifndef _LPROCFS_SNMP_H
24 #define _LPROCFS_SNMP_H
32 #include <linux/proc_fs.h>
35 typedef struct lprocfs_vars{
37 read_proc_t* read_fptr;
38 write_proc_t* write_fptr;
43 struct proc_dir_entry* lprocfs_mkdir(const char* dname,
44 struct proc_dir_entry *parent);
45 struct proc_dir_entry* lprocfs_srch(struct proc_dir_entry* head,
47 void lprocfs_remove_all(struct proc_dir_entry* root);
48 struct proc_dir_entry* lprocfs_new_dir(struct proc_dir_entry* root,
49 const char* string, const char* tok);
50 int lprocfs_new_vars(struct proc_dir_entry* root, lprocfs_vars_t* list,
51 const char* tok, void* data);
52 int lprocfs_add_vars(struct proc_dir_entry* root, lprocfs_vars_t* var,
54 int lprocfs_reg_obd(struct obd_device* device, lprocfs_vars_t* list,
56 int lprocfs_dereg_obd(struct obd_device* device);
57 struct proc_dir_entry* lprocfs_reg_mnt(char *mnt_name);
58 int lprocfs_dereg_mnt(struct proc_dir_entry* root);
59 int lprocfs_reg_class(struct obd_type* type, lprocfs_vars_t* list, void* data);
60 int lprocfs_dereg_class(struct obd_type* class);
61 int lprocfs_reg_main(void);
62 int lprocfs_dereg_main(void);
63 int lprocfs_ll_rd(char *page, char **start, off_t off, int count, int *eof,
68 static inline int lprocfs_add_vars(struct proc_dir_entry* root,
69 lprocfs_vars_t* var, void* data)
74 static inline int lprocfs_reg_obd(struct obd_device* device,
81 static inline int lprocfs_dereg_obd(struct obd_device* device)
86 static inline struct proc_dir_entry* lprocfs_reg_mnt(char *name)
91 static inline int lprocfs_dereg_mnt(struct proc_dir_entry* root)
96 static inline int lprocfs_reg_class(struct obd_type* type,
97 lprocfs_vars_t* list, void* data)
102 static inline int lprocfs_dereg_class(struct obd_type* class)
107 static inline int lprocfs_reg_main(void)
112 static inline int lprocfs_dereg_main(void)
117 static inline int lprocfs_ll_rd(char *page, char **start, off_t off,
118 int count, int *eof, void *data)
122 #endif /* LPROC_SNMP */
124 #endif /* LPROCFS_SNMP_H */