Create a subtree 'harp' of the net sysctl tree. This uses a fixed

OID as the other protocol family sub-trees do, that is equal to the
protocol family identifier. Make the ATM layer debugging flags
available under this tree.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
This commit is contained in:
Hartmut Brandt 2003-07-24 10:33:01 +00:00
parent 30c6c4029c
commit ca4125f7b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117965
3 changed files with 31 additions and 3 deletions

View file

@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/domain.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <netatm/port.h>
#include <netatm/queue.h>
@ -114,6 +115,8 @@ struct domain atmdomain = {
DOMAIN_SET(atm);
SYSCTL_NODE(_net, PF_ATM, harp, CTLFLAG_RW, 0, "HARP/ATM family");
SYSCTL_NODE(_net_harp, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM layer");
/*
* Protocol request not supported

View file

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <net/netisr.h>
#include <netatm/port.h>
@ -64,15 +65,33 @@ Atm_endpoint *atm_endpoints[ENDPT_MAX+1] = {NULL};
struct stackq_entry *atm_stackq_head = NULL, *atm_stackq_tail;
struct atm_sock_stat atm_sock_stat = { { 0 } };
int atm_init = 0;
int atm_debug = 0;
int atm_dev_print = 0;
int atm_print_data = 0;
int atm_version = ATM_VERSION;
struct timeval atm_debugtime = {0, 0};
struct ifqueue atm_intrq;
uma_zone_t atm_attributes_zone;
/*
* net.harp.atm.atm_debug
*/
int atm_debug;
SYSCTL_INT(_net_harp_atm, OID_AUTO, atm_debug, CTLFLAG_RW,
&atm_debug, 0, "HARP ATM layer debugging flag");
/*
* net.harp.atm.atm_dev_print
*/
int atm_dev_print;
SYSCTL_INT(_net_harp_atm, OID_AUTO, atm_dev_print, CTLFLAG_RW,
&atm_dev_print, 0, "display ATM CPCS headers");
/*
* net.harp.atm.atm_print_data
*/
int atm_print_data;
SYSCTL_INT(_net_harp_atm, OID_AUTO, atm_print_data, CTLFLAG_RW,
&atm_print_data, 0, "display ATM CPCS payloads");
/*
* Local functions
*/

View file

@ -174,5 +174,11 @@ int atm_stack_enq(int, void (*)(int, void *, intptr_t, intptr_t),
void *, Atm_connvc *, intptr_t, intptr_t);
void atm_stack_drain(void);
void atm_pdu_print(const KBuffer *, const char *);
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_harp);
SYSCTL_DECL(_net_harp_atm);
#endif
#endif /* _KERNEL */
#endif /* _NETATM_ATM_VAR_H */