mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-24 02:22:03 +08:00
tcpdump: Constify
This commit is contained in:
parent
6427453ee8
commit
12c2cfb793
@ -2809,7 +2809,7 @@ print_radiotap_field(netdissect_options *ndo,
|
|||||||
uint8_t known;
|
uint8_t known;
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
uint8_t mcs_index;
|
uint8_t mcs_index;
|
||||||
static const char *ht_bandwidth[4] = {
|
static const char * const ht_bandwidth[4] = {
|
||||||
"20 MHz",
|
"20 MHz",
|
||||||
"40 MHz",
|
"40 MHz",
|
||||||
"20 MHz (L)",
|
"20 MHz (L)",
|
||||||
@ -2929,7 +2929,7 @@ print_radiotap_field(netdissect_options *ndo,
|
|||||||
uint8_t coding;
|
uint8_t coding;
|
||||||
uint8_t group_id;
|
uint8_t group_id;
|
||||||
uint16_t partial_aid;
|
uint16_t partial_aid;
|
||||||
static const char *vht_bandwidth[32] = {
|
static const char * const vht_bandwidth[32] = {
|
||||||
"20 MHz",
|
"20 MHz",
|
||||||
"40 MHz",
|
"40 MHz",
|
||||||
"20 MHz (L)",
|
"20 MHz (L)",
|
||||||
|
@ -590,7 +590,7 @@ static const struct tok mldv2report2str[] = {
|
|||||||
static const char *
|
static const char *
|
||||||
get_rtpref(u_int v)
|
get_rtpref(u_int v)
|
||||||
{
|
{
|
||||||
static const char *rtpref_str[] = {
|
static const char * const rtpref_str[] = {
|
||||||
"medium", /* 00 */
|
"medium", /* 00 */
|
||||||
"high", /* 01 */
|
"high", /* 01 */
|
||||||
"rsv", /* 10 */
|
"rsv", /* 10 */
|
||||||
|
@ -1343,10 +1343,10 @@ ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
|
|||||||
#define USE_IPSECDOI_IN_PHASE1 1
|
#define USE_IPSECDOI_IN_PHASE1 1
|
||||||
const struct ikev1_pl_id *p;
|
const struct ikev1_pl_id *p;
|
||||||
struct ikev1_pl_id id;
|
struct ikev1_pl_id id;
|
||||||
static const char *idtypestr[] = {
|
static const char * const idtypestr[] = {
|
||||||
"IPv4", "IPv4net", "IPv6", "IPv6net",
|
"IPv4", "IPv4net", "IPv6", "IPv6net",
|
||||||
};
|
};
|
||||||
static const char *ipsecidtypestr[] = {
|
static const char * const ipsecidtypestr[] = {
|
||||||
NULL, "IPv4", "FQDN", "user FQDN", "IPv4net", "IPv6",
|
NULL, "IPv4", "FQDN", "user FQDN", "IPv4net", "IPv6",
|
||||||
"IPv6net", "IPv4range", "IPv6range", "ASN1 DN", "ASN1 GN",
|
"IPv6net", "IPv4range", "IPv6range", "ASN1 DN", "ASN1 GN",
|
||||||
"keyid",
|
"keyid",
|
||||||
@ -1512,7 +1512,7 @@ ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_,
|
|||||||
{
|
{
|
||||||
const struct ikev1_pl_cert *p;
|
const struct ikev1_pl_cert *p;
|
||||||
struct ikev1_pl_cert cert;
|
struct ikev1_pl_cert cert;
|
||||||
static const char *certstr[] = {
|
static const char * const certstr[] = {
|
||||||
"none", "pkcs7", "pgp", "dns",
|
"none", "pkcs7", "pgp", "dns",
|
||||||
"x509sign", "x509ke", "kerberos", "crl",
|
"x509sign", "x509ke", "kerberos", "crl",
|
||||||
"arl", "spki", "x509attr",
|
"arl", "spki", "x509attr",
|
||||||
@ -1545,7 +1545,7 @@ ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_,
|
|||||||
{
|
{
|
||||||
const struct ikev1_pl_cert *p;
|
const struct ikev1_pl_cert *p;
|
||||||
struct ikev1_pl_cert cert;
|
struct ikev1_pl_cert cert;
|
||||||
static const char *certstr[] = {
|
static const char * const certstr[] = {
|
||||||
"none", "pkcs7", "pgp", "dns",
|
"none", "pkcs7", "pgp", "dns",
|
||||||
"x509sign", "x509ke", "kerberos", "crl",
|
"x509sign", "x509ke", "kerberos", "crl",
|
||||||
"arl", "spki", "x509attr",
|
"arl", "spki", "x509attr",
|
||||||
@ -1667,7 +1667,7 @@ ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
|
|||||||
const u_char *ep2;
|
const u_char *ep2;
|
||||||
uint32_t doi;
|
uint32_t doi;
|
||||||
uint32_t proto;
|
uint32_t proto;
|
||||||
static const char *notify_error_str[] = {
|
static const char * const notify_error_str[] = {
|
||||||
NULL, "INVALID-PAYLOAD-TYPE",
|
NULL, "INVALID-PAYLOAD-TYPE",
|
||||||
"DOI-NOT-SUPPORTED", "SITUATION-NOT-SUPPORTED",
|
"DOI-NOT-SUPPORTED", "SITUATION-NOT-SUPPORTED",
|
||||||
"INVALID-COOKIE", "INVALID-MAJOR-VERSION",
|
"INVALID-COOKIE", "INVALID-MAJOR-VERSION",
|
||||||
@ -1685,13 +1685,13 @@ ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
|
|||||||
"CERTIFICATE-UNAVAILABLE", "UNSUPPORTED-EXCHANGE-TYPE",
|
"CERTIFICATE-UNAVAILABLE", "UNSUPPORTED-EXCHANGE-TYPE",
|
||||||
"UNEQUAL-PAYLOAD-LENGTHS",
|
"UNEQUAL-PAYLOAD-LENGTHS",
|
||||||
};
|
};
|
||||||
static const char *ipsec_notify_error_str[] = {
|
static const char * const ipsec_notify_error_str[] = {
|
||||||
"RESERVED",
|
"RESERVED",
|
||||||
};
|
};
|
||||||
static const char *notify_status_str[] = {
|
static const char * const notify_status_str[] = {
|
||||||
"CONNECTED",
|
"CONNECTED",
|
||||||
};
|
};
|
||||||
static const char *ipsec_notify_status_str[] = {
|
static const char * const ipsec_notify_status_str[] = {
|
||||||
"RESPONDER-LIFETIME", "REPLAY-STATUS",
|
"RESPONDER-LIFETIME", "REPLAY-STATUS",
|
||||||
"INITIAL-CONTACT",
|
"INITIAL-CONTACT",
|
||||||
};
|
};
|
||||||
|
@ -401,9 +401,9 @@ void
|
|||||||
unsigned_relts_print(netdissect_options *ndo,
|
unsigned_relts_print(netdissect_options *ndo,
|
||||||
uint32_t secs)
|
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};
|
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;
|
const u_int *s = seconds;
|
||||||
|
|
||||||
if (secs == 0) {
|
if (secs == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user