Make the debugging variable that controls dumping of IP over ATM packets

accessible as a sysctl.

Submitted by:	Vincent Jardin <vjardin@wanadoo.fr>
MFC after:	2 weeks
This commit is contained in:
Hartmut Brandt 2003-07-24 15:25:17 +00:00
parent 5d53a37cb4
commit 80366b6d6a
4 changed files with 19 additions and 10 deletions

View File

@ -72,11 +72,9 @@ ipatm_cpcs_data(tok, m)
{
struct ipvcc *ivp = tok;
#ifdef DIAGNOSTIC
if (ipatm_print) {
atm_pdu_print(m, "ipatm_input");
}
#endif
/*
* Handle input packet
@ -120,11 +118,9 @@ ipatm_ipinput(inp, m)
KBuffer *m;
{
#ifdef DIAGNOSTIC
if (ipatm_print) {
atm_pdu_print(m, "ipatm_ipinput");
}
#endif
#ifdef DIAGNOSTIC
if (!KB_ISPKT(m)) {

View File

@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#endif
#include <sys/param.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/time.h>
@ -46,6 +45,8 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/syslog.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/in_var.h>
@ -70,7 +71,6 @@ __FBSDID("$FreeBSD$");
*/
int ipatm_vccnt = 0;
int ipatm_vcidle = IPATM_VCIDLE;
int ipatm_print = 0;
u_long last_map_ipdst = 0;
struct ipvcc* last_map_ipvcc = NULL;
@ -100,6 +100,19 @@ Atm_endpoint ipatm_endpt = {
uma_zone_t ipatm_vc_zone;
/*
* net.harp.ip
*/
SYSCTL_NODE(_net_harp, OID_AUTO, ip, CTLFLAG_RW, 0, "IPv4 over ATM");
/*
* net.harp.ip.ipatm_print
*/
int ipatm_print = 0;
SYSCTL_INT(_net_harp_ip, OID_AUTO, ipatm_print, CTLFLAG_RW,
&ipatm_print, 0, "dump IPv4-over-ATM packets");
/*
* Local functions
*/

View File

@ -85,11 +85,9 @@ ipatm_ifoutput(ifp, m, dst)
struct ipvcc *ivp;
int err = 0;
#ifdef DIAGNOSTIC
if (ipatm_print) {
atm_pdu_print(m, "ipatm_ifoutput");
}
#endif
/*
* See if we've already got an appropriate VCC
@ -217,4 +215,3 @@ ipatm_ifoutput(ifp, m, dst)
done:
return (err);
}

View File

@ -201,7 +201,6 @@ extern u_long last_map_ipdst;
extern struct ipvcc *last_map_ipvcc;
extern struct ip_nif *ipatm_nif_head;
extern uma_zone_t ipatm_vc_zone;
extern uma_zone_t ipatm_nif_zone;
extern struct ipatm_stat ipatm_stat;
extern struct atm_time ipatm_itimer;
extern Atm_endpoint ipatm_endpt;
@ -209,6 +208,10 @@ extern Atm_attributes ipatm_aal5llc;
extern Atm_attributes ipatm_aal5null;
extern Atm_attributes ipatm_aal4null;
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_harp_ip);
#endif
#endif /* _KERNEL */
#endif /* _IPATM_IPATM_VAR_H */