summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-11-15 15:26:35 +0000
committerharti <harti@FreeBSD.org>2003-11-15 15:26:35 +0000
commit91fb8e3f9c1a952bb775f1bb31ea6559b00513de (patch)
tree201c2a255c93bc25015b4e71f409755772c4c70e /share
parent893ed3a2447f87376575889b23f244a2d8f65be6 (diff)
downloadFreeBSD-src-91fb8e3f9c1a952bb775f1bb31ea6559b00513de.zip
FreeBSD-src-91fb8e3f9c1a952bb775f1bb31ea6559b00513de.tar.gz
Replace all uses of the old netgraph constants NG_*LEN by the new
constants NG_*SIZ that include the trailing NUL byte. This change is mostly mechanical except for the replacement of a couple of snprintf() and sprintf() calls with strlcpy.
Diffstat (limited to 'share')
-rw-r--r--share/examples/netgraph/ngctl4
-rw-r--r--share/man/man4/ng_atm.44
-rw-r--r--share/man/man4/ng_bpf.46
-rw-r--r--share/man/man4/ng_etf.42
-rw-r--r--share/man/man4/ng_pppoe.46
5 files changed, 11 insertions, 11 deletions
diff --git a/share/examples/netgraph/ngctl b/share/examples/netgraph/ngctl
index 26ec749..80a7f22 100644
--- a/share/examples/netgraph/ngctl
+++ b/share/examples/netgraph/ngctl
@@ -150,8 +150,8 @@
#
# /* Structure used for NGM_LISTHOOKS */
# struct linkinfo {
-# char ourhook[NG_HOOKLEN + 1]; /* hook name */
-# char peerhook[NG_HOOKLEN + 1]; /* peer hook */
+# char ourhook[NG_HOOKSIZ]; /* hook name */
+# char peerhook[NG_HOOKSIZ]; /* peer hook */
# struct nodeinfo nodeinfo;
# };
#
diff --git a/share/man/man4/ng_atm.4 b/share/man/man4/ng_atm.4
index 0907115..c95d56f 100644
--- a/share/man/man4/ng_atm.4
+++ b/share/man/man4/ng_atm.4
@@ -232,7 +232,7 @@ all traffic types however):
Initialize a VCC for sending and receiving. The argument is a structure:
.Bd -literal
struct ng_atm_cpcs_init {
- char name[NG_HOOKLEN + 1];
+ char name[NG_HOOKSIZ];
uint32_t flags; /* flags. (if_natmio.h) */
uint16_t vci; /* VCI to open */
uint16_t vpi; /* VPI to open */
@@ -276,7 +276,7 @@ type of traffic.
Stop sending and receiving on the indicated hook. The argument is a
.Bd -literal
struct ng_atm_cpcs_term {
- char name[NG_HOOKLEN + 1];
+ char name[NG_HOOKSIZ];
};
.Ed
.El
diff --git a/share/man/man4/ng_bpf.4 b/share/man/man4/ng_bpf.4
index a4717ef..1c24b07 100644
--- a/share/man/man4/ng_bpf.4
+++ b/share/man/man4/ng_bpf.4
@@ -82,9 +82,9 @@ This command sets the filter program that will be applied to incoming
data on a hook. The following structure must be supplied as an argument:
.Bd -literal -offset 4n
struct ng_bpf_hookprog {
- char thisHook[NG_HOOKLEN+1]; /* name of hook */
- char ifMatch[NG_HOOKLEN+1]; /* match dest hook */
- char ifNotMatch[NG_HOOKLEN+1]; /* !match dest hook */
+ char thisHook[NG_HOOKSIZ]; /* name of hook */
+ char ifMatch[NG_HOOKSIZ]; /* match dest hook */
+ char ifNotMatch[NG_HOOKSIZ]; /* !match dest hook */
int32_t bpf_prog_len; /* #isns in program */
struct bpf_insn bpf_prog[0]; /* bpf program */
};
diff --git a/share/man/man4/ng_etf.4 b/share/man/man4/ng_etf.4
index 3fcb52f..0e6a168 100644
--- a/share/man/man4/ng_etf.4
+++ b/share/man/man4/ng_etf.4
@@ -100,7 +100,7 @@ are specified in a structure of type
.Vt "struct ng_etffilter" :
.Bd -literal -offset 4n
struct ng_etffilter {
- char matchhook[NG_HOOKLEN + 1]; /* hook name */
+ char matchhook[NG_HOOKSIZ]; /* hook name */
u_int16_t ethertype; /* catch these */
};
.Ed
diff --git a/share/man/man4/ng_pppoe.4 b/share/man/man4/ng_pppoe.4
index adfc9d8..1aecc1c 100644
--- a/share/man/man4/ng_pppoe.4
+++ b/share/man/man4/ng_pppoe.4
@@ -135,7 +135,7 @@ structure shown below.
The three commands above use a common data structure:
.Bd -literal -offset 4n
struct ngpppoe_init_data {
- char hook[NG_HOOKLEN + 1]; /* hook to monitor on */
+ char hook[NG_HOOKSIZ]; /* hook to monitor on */
u_int16_t data_len; /* service name length */
char data[0]; /* init data goes here */
};
@@ -171,7 +171,7 @@ above messages, and reports the Access Concentrator Name.
The four commands above use a common data structure:
.Bd -literal -offset 4n
struct ngpppoe_sts {
- char hook[NG_HOOKLEN + 1]; /* hook associated with event session */
+ char hook[NG_HOOKSIZ]; /* hook associated with event session */
};
.Ed
.Sh SHUTDOWN
@@ -257,7 +257,7 @@ setup(char *ethername, char *service, char *sessname,
} message;
/********tracking our little graph ********/
char path[100];
- char source_ID[NG_NODELEN + 1];
+ char source_ID[NG_NODESIZ];
char pppoe_node_name[100];
int k;
OpenPOWER on IntegriCloud