1 /*********************************************************************
6 * Status: Experimental.
7 * Author: Dag Brattli <dagb@cs.uit.no>
8 * Created at: Sun May 24 22:12:06 1998
9 * Modified at: Thu Jan 7 10:35:02 1999
10 * Modified by: Dag Brattli <dagb@cs.uit.no>
12 * Copyright (c) 1997 Dag Brattli, All Rights Reserved.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge.
23 ********************************************************************/
25 #include <linux/config.h>
27 #include <linux/ctype.h>
28 #include <linux/sysctl.h>
29 #include <asm/segment.h>
31 #include <net/irda/irda.h>
33 #define NET_IRDA 412 /* Random number */
34 enum { DISCOVERY
=1, DEVNAME
, COMPRESSION
, DEBUG
};
36 extern int sysctl_discovery
;
37 int sysctl_compression
= 0;
38 extern char sysctl_devname
[];
40 #ifdef CONFIG_IRDA_DEBUG
41 extern unsigned int irda_debug
;
45 static ctl_table irda_table
[] = {
46 { DISCOVERY
, "discovery", &sysctl_discovery
,
47 sizeof(int), 0644, NULL
, &proc_dointvec
},
48 { DEVNAME
, "devname", sysctl_devname
,
49 65, 0644, NULL
, &proc_dostring
, &sysctl_string
},
50 { COMPRESSION
, "compression", &sysctl_compression
,
51 sizeof(int), 0644, NULL
, &proc_dointvec
},
52 #ifdef CONFIG_IRDA_DEBUG
53 { DEBUG
, "debug", &irda_debug
,
54 sizeof(int), 0644, NULL
, &proc_dointvec
},
60 static ctl_table irda_net_table
[] = {
61 { NET_IRDA
, "irda", NULL
, 0, 0555, irda_table
},
65 /* The parent directory */
66 static ctl_table irda_root_table
[] = {
67 { CTL_NET
, "net", NULL
, 0, 0555, irda_net_table
},
71 static struct ctl_table_header
*irda_table_header
;
74 * Function irda_sysctl_register (void)
76 * Register our sysctl interface
79 int irda_sysctl_register(void)
81 irda_table_header
= register_sysctl_table( irda_root_table
, 0);
82 if ( !irda_table_header
)
88 * Function irda_sysctl_unregister (void)
90 * Unregister our sysctl interface
93 void irda_sysctl_unregister(void)
95 unregister_sysctl_table( irda_table_header
);