Allow the user access to net.inet.igmp, even though there's nothing
sysctl(8) can interpret there. (Someday there might be.)
This commit is contained in:
parent
f2ea20e676
commit
9426bb7c1d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6473
@ -30,7 +30,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93
|
.\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93
|
||||||
.\" $Id: sysctl.8,v 1.3 1994/10/17 18:55:21 ache Exp $
|
.\" $Id: sysctl.8,v 1.4 1994/10/18 03:41:16 ache Exp $
|
||||||
.\"
|
.\"
|
||||||
.Dd September 23, 1994
|
.Dd September 23, 1994
|
||||||
.Dt SYSCTL 8
|
.Dt SYSCTL 8
|
||||||
@ -132,11 +132,6 @@ privilege can change the value.
|
|||||||
.It kern.osreldate string no
|
.It kern.osreldate string no
|
||||||
.It kern.bootfile string yes
|
.It kern.bootfile string yes
|
||||||
.It vm.loadavg struct no
|
.It vm.loadavg struct no
|
||||||
.It net.inet.ip.forwarding integer yes
|
|
||||||
.It net.inet.ip.redirect integer yes
|
|
||||||
.It net.inet.ip.ttl integer yes
|
|
||||||
.It net.inet.icmp.maskrepl integer yes
|
|
||||||
.It net.inet.udp.checksum integer yes
|
|
||||||
.It hw.machine string no
|
.It hw.machine string no
|
||||||
.It hw.model string no
|
.It hw.model string no
|
||||||
.It hw.ncpu integer no
|
.It hw.ncpu integer no
|
||||||
|
@ -40,7 +40,7 @@ static char copyright[] =
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: sysctl.c,v 1.3 1995/02/09 23:16:17 wollman Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -63,6 +63,7 @@ static const char rcsid[] =
|
|||||||
#include <netinet/tcp_seq.h>
|
#include <netinet/tcp_seq.h>
|
||||||
#include <netinet/tcp_timer.h>
|
#include <netinet/tcp_timer.h>
|
||||||
#include <netinet/tcp_var.h>
|
#include <netinet/tcp_var.h>
|
||||||
|
#include <netinet/igmp_var.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -298,7 +299,8 @@ parse(string, flags)
|
|||||||
|
|
||||||
case CTL_NET:
|
case CTL_NET:
|
||||||
if (mib[1] == PF_INET) {
|
if (mib[1] == PF_INET) {
|
||||||
len = sysctl_inet(string, &bufp, mib, flags, &type);
|
len = sysctl_inet(string, &bufp, mib, flags, &type,
|
||||||
|
&special);
|
||||||
if (len >= 0)
|
if (len >= 0)
|
||||||
break;
|
break;
|
||||||
return;
|
return;
|
||||||
@ -479,13 +481,14 @@ struct ctlname ipname[] = IPCTL_NAMES;
|
|||||||
struct ctlname icmpname[] = ICMPCTL_NAMES;
|
struct ctlname icmpname[] = ICMPCTL_NAMES;
|
||||||
struct ctlname udpname[] = UDPCTL_NAMES;
|
struct ctlname udpname[] = UDPCTL_NAMES;
|
||||||
struct ctlname tcpname[] = TCPCTL_NAMES;
|
struct ctlname tcpname[] = TCPCTL_NAMES;
|
||||||
|
struct ctlname igmpname[] = IGMPCTL_NAMES;
|
||||||
struct list inetlist = { inetname, IPPROTO_MAXID };
|
struct list inetlist = { inetname, IPPROTO_MAXID };
|
||||||
struct list inetvars[] = {
|
struct list inetvars[] = {
|
||||||
{ ipname, IPCTL_MAXID }, /* ip */
|
{ ipname, IPCTL_MAXID }, /* ip */
|
||||||
{ icmpname, ICMPCTL_MAXID }, /* icmp */
|
{ icmpname, ICMPCTL_MAXID }, /* icmp */
|
||||||
{ 0, 0 }, /* igmp */
|
{ igmpname, IGMPCTL_MAXID }, /* igmp */
|
||||||
{ 0, 0 }, /* ggmp */
|
{ 0, 0 }, /* ggp */
|
||||||
{ 0, 0 },
|
{ 0, 0 }, /* ipencap */
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
{ tcpname, TCPCTL_MAXID }, /* tcp */
|
{ tcpname, TCPCTL_MAXID }, /* tcp */
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
@ -504,12 +507,14 @@ struct list inetvars[] = {
|
|||||||
/*
|
/*
|
||||||
* handle internet requests
|
* handle internet requests
|
||||||
*/
|
*/
|
||||||
sysctl_inet(string, bufpp, mib, flags, typep)
|
int
|
||||||
|
sysctl_inet(string, bufpp, mib, flags, typep, specialp)
|
||||||
char *string;
|
char *string;
|
||||||
char **bufpp;
|
char **bufpp;
|
||||||
int mib[];
|
int mib[];
|
||||||
int flags;
|
int flags;
|
||||||
int *typep;
|
int *typep;
|
||||||
|
int *specialp;
|
||||||
{
|
{
|
||||||
struct list *lp;
|
struct list *lp;
|
||||||
int indx;
|
int indx;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93
|
.\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93
|
||||||
.\" $Id: sysctl.8,v 1.3 1994/10/17 18:55:21 ache Exp $
|
.\" $Id: sysctl.8,v 1.4 1994/10/18 03:41:16 ache Exp $
|
||||||
.\"
|
.\"
|
||||||
.Dd September 23, 1994
|
.Dd September 23, 1994
|
||||||
.Dt SYSCTL 8
|
.Dt SYSCTL 8
|
||||||
@ -132,11 +132,6 @@ privilege can change the value.
|
|||||||
.It kern.osreldate string no
|
.It kern.osreldate string no
|
||||||
.It kern.bootfile string yes
|
.It kern.bootfile string yes
|
||||||
.It vm.loadavg struct no
|
.It vm.loadavg struct no
|
||||||
.It net.inet.ip.forwarding integer yes
|
|
||||||
.It net.inet.ip.redirect integer yes
|
|
||||||
.It net.inet.ip.ttl integer yes
|
|
||||||
.It net.inet.icmp.maskrepl integer yes
|
|
||||||
.It net.inet.udp.checksum integer yes
|
|
||||||
.It hw.machine string no
|
.It hw.machine string no
|
||||||
.It hw.model string no
|
.It hw.model string no
|
||||||
.It hw.ncpu integer no
|
.It hw.ncpu integer no
|
||||||
|
@ -40,7 +40,7 @@ static char copyright[] =
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
/*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id$";
|
"$Id: sysctl.c,v 1.3 1995/02/09 23:16:17 wollman Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -63,6 +63,7 @@ static const char rcsid[] =
|
|||||||
#include <netinet/tcp_seq.h>
|
#include <netinet/tcp_seq.h>
|
||||||
#include <netinet/tcp_timer.h>
|
#include <netinet/tcp_timer.h>
|
||||||
#include <netinet/tcp_var.h>
|
#include <netinet/tcp_var.h>
|
||||||
|
#include <netinet/igmp_var.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -298,7 +299,8 @@ parse(string, flags)
|
|||||||
|
|
||||||
case CTL_NET:
|
case CTL_NET:
|
||||||
if (mib[1] == PF_INET) {
|
if (mib[1] == PF_INET) {
|
||||||
len = sysctl_inet(string, &bufp, mib, flags, &type);
|
len = sysctl_inet(string, &bufp, mib, flags, &type,
|
||||||
|
&special);
|
||||||
if (len >= 0)
|
if (len >= 0)
|
||||||
break;
|
break;
|
||||||
return;
|
return;
|
||||||
@ -479,13 +481,14 @@ struct ctlname ipname[] = IPCTL_NAMES;
|
|||||||
struct ctlname icmpname[] = ICMPCTL_NAMES;
|
struct ctlname icmpname[] = ICMPCTL_NAMES;
|
||||||
struct ctlname udpname[] = UDPCTL_NAMES;
|
struct ctlname udpname[] = UDPCTL_NAMES;
|
||||||
struct ctlname tcpname[] = TCPCTL_NAMES;
|
struct ctlname tcpname[] = TCPCTL_NAMES;
|
||||||
|
struct ctlname igmpname[] = IGMPCTL_NAMES;
|
||||||
struct list inetlist = { inetname, IPPROTO_MAXID };
|
struct list inetlist = { inetname, IPPROTO_MAXID };
|
||||||
struct list inetvars[] = {
|
struct list inetvars[] = {
|
||||||
{ ipname, IPCTL_MAXID }, /* ip */
|
{ ipname, IPCTL_MAXID }, /* ip */
|
||||||
{ icmpname, ICMPCTL_MAXID }, /* icmp */
|
{ icmpname, ICMPCTL_MAXID }, /* icmp */
|
||||||
{ 0, 0 }, /* igmp */
|
{ igmpname, IGMPCTL_MAXID }, /* igmp */
|
||||||
{ 0, 0 }, /* ggmp */
|
{ 0, 0 }, /* ggp */
|
||||||
{ 0, 0 },
|
{ 0, 0 }, /* ipencap */
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
{ tcpname, TCPCTL_MAXID }, /* tcp */
|
{ tcpname, TCPCTL_MAXID }, /* tcp */
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
@ -504,12 +507,14 @@ struct list inetvars[] = {
|
|||||||
/*
|
/*
|
||||||
* handle internet requests
|
* handle internet requests
|
||||||
*/
|
*/
|
||||||
sysctl_inet(string, bufpp, mib, flags, typep)
|
int
|
||||||
|
sysctl_inet(string, bufpp, mib, flags, typep, specialp)
|
||||||
char *string;
|
char *string;
|
||||||
char **bufpp;
|
char **bufpp;
|
||||||
int mib[];
|
int mib[];
|
||||||
int flags;
|
int flags;
|
||||||
int *typep;
|
int *typep;
|
||||||
|
int *specialp;
|
||||||
{
|
{
|
||||||
struct list *lp;
|
struct list *lp;
|
||||||
int indx;
|
int indx;
|
||||||
|
Loading…
Reference in New Issue
Block a user