summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-11 09:16:02 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-03-11 09:37:03 +0100
commit12c2cfb7934cd0be8c90517d6c9e36385c19dc38 (patch)
tree798eddffcbea78dc00cd688387282f4191c06023
parentrcconf02: Reduce maximum connection counts (diff)
downloadrtems-libbsd-12c2cfb7934cd0be8c90517d6c9e36385c19dc38.tar.bz2
tcpdump: Constify
-rw-r--r--freebsd/contrib/tcpdump/print-802_11.c4
-rw-r--r--freebsd/contrib/tcpdump/print-icmp6.c2
-rw-r--r--freebsd/contrib/tcpdump/print-isakmp.c16
-rw-r--r--freebsd/contrib/tcpdump/util-print.c4
4 files changed, 13 insertions, 13 deletions
diff --git a/freebsd/contrib/tcpdump/print-802_11.c b/freebsd/contrib/tcpdump/print-802_11.c
index 990b5777..ff2ac02a 100644
--- a/freebsd/contrib/tcpdump/print-802_11.c
+++ b/freebsd/contrib/tcpdump/print-802_11.c
@@ -2809,7 +2809,7 @@ print_radiotap_field(netdissect_options *ndo,
uint8_t known;
uint8_t flags;
uint8_t mcs_index;
- static const char *ht_bandwidth[4] = {
+ static const char * const ht_bandwidth[4] = {
"20 MHz",
"40 MHz",
"20 MHz (L)",
@@ -2929,7 +2929,7 @@ print_radiotap_field(netdissect_options *ndo,
uint8_t coding;
uint8_t group_id;
uint16_t partial_aid;
- static const char *vht_bandwidth[32] = {
+ static const char * const vht_bandwidth[32] = {
"20 MHz",
"40 MHz",
"20 MHz (L)",
diff --git a/freebsd/contrib/tcpdump/print-icmp6.c b/freebsd/contrib/tcpdump/print-icmp6.c
index e2d44dfb..33f36ddd 100644
--- a/freebsd/contrib/tcpdump/print-icmp6.c
+++ b/freebsd/contrib/tcpdump/print-icmp6.c
@@ -590,7 +590,7 @@ static const struct tok mldv2report2str[] = {
static const char *
get_rtpref(u_int v)
{
- static const char *rtpref_str[] = {
+ static const char * const rtpref_str[] = {
"medium", /* 00 */
"high", /* 01 */
"rsv", /* 10 */
diff --git a/freebsd/contrib/tcpdump/print-isakmp.c b/freebsd/contrib/tcpdump/print-isakmp.c
index fd78bf86..bcb1caf7 100644
--- a/freebsd/contrib/tcpdump/print-isakmp.c
+++ b/freebsd/contrib/tcpdump/print-isakmp.c
@@ -1343,10 +1343,10 @@ ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
#define USE_IPSECDOI_IN_PHASE1 1
const struct ikev1_pl_id *p;
struct ikev1_pl_id id;
- static const char *idtypestr[] = {
+ static const char * const idtypestr[] = {
"IPv4", "IPv4net", "IPv6", "IPv6net",
};
- static const char *ipsecidtypestr[] = {
+ static const char * const ipsecidtypestr[] = {
NULL, "IPv4", "FQDN", "user FQDN", "IPv4net", "IPv6",
"IPv6net", "IPv4range", "IPv6range", "ASN1 DN", "ASN1 GN",
"keyid",
@@ -1512,7 +1512,7 @@ ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_,
{
const struct ikev1_pl_cert *p;
struct ikev1_pl_cert cert;
- static const char *certstr[] = {
+ static const char * const certstr[] = {
"none", "pkcs7", "pgp", "dns",
"x509sign", "x509ke", "kerberos", "crl",
"arl", "spki", "x509attr",
@@ -1545,7 +1545,7 @@ ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_,
{
const struct ikev1_pl_cert *p;
struct ikev1_pl_cert cert;
- static const char *certstr[] = {
+ static const char * const certstr[] = {
"none", "pkcs7", "pgp", "dns",
"x509sign", "x509ke", "kerberos", "crl",
"arl", "spki", "x509attr",
@@ -1667,7 +1667,7 @@ ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
const u_char *ep2;
uint32_t doi;
uint32_t proto;
- static const char *notify_error_str[] = {
+ static const char * const notify_error_str[] = {
NULL, "INVALID-PAYLOAD-TYPE",
"DOI-NOT-SUPPORTED", "SITUATION-NOT-SUPPORTED",
"INVALID-COOKIE", "INVALID-MAJOR-VERSION",
@@ -1685,13 +1685,13 @@ ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
"CERTIFICATE-UNAVAILABLE", "UNSUPPORTED-EXCHANGE-TYPE",
"UNEQUAL-PAYLOAD-LENGTHS",
};
- static const char *ipsec_notify_error_str[] = {
+ static const char * const ipsec_notify_error_str[] = {
"RESERVED",
};
- static const char *notify_status_str[] = {
+ static const char * const notify_status_str[] = {
"CONNECTED",
};
- static const char *ipsec_notify_status_str[] = {
+ static const char * const ipsec_notify_status_str[] = {
"RESPONDER-LIFETIME", "REPLAY-STATUS",
"INITIAL-CONTACT",
};
diff --git a/freebsd/contrib/tcpdump/util-print.c b/freebsd/contrib/tcpdump/util-print.c
index 7a5269dd..8a995534 100644
--- a/freebsd/contrib/tcpdump/util-print.c
+++ b/freebsd/contrib/tcpdump/util-print.c
@@ -401,9 +401,9 @@ void
unsigned_relts_print(netdissect_options *ndo,
uint32_t secs)
{
- static const char *lengths[] = {"y", "w", "d", "h", "m", "s"};
+ static const char * const lengths[] = {"y", "w", "d", "h", "m", "s"};
static const u_int seconds[] = {31536000, 604800, 86400, 3600, 60, 1};
- const char **l = lengths;
+ const char * const *l = lengths;
const u_int *s = seconds;
if (secs == 0) {