summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-02-20 07:44:56 +0100
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-02-20 07:45:39 +0100
commit2086d80fa01978811613f79a480ea808779b9407 (patch)
tree2e5c4ba5b1112d8be47e3e91b210adb140034c19
parent6457f82aaa95e042eb5cf99e3fd6f518e36f28bd (diff)
downloadtcpdump-2086d80fa01978811613f79a480ea808779b9407.tar.gz
af.h/c: make several structs const
-rw-r--r--addrtoname.c4
-rw-r--r--af.c4
-rw-r--r--af.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/addrtoname.c b/addrtoname.c
index d36767fd..895f1492 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -768,7 +768,7 @@ init_protoidarray(void)
{
register int i;
register struct protoidmem *tp;
- struct protoidlist *pl;
+ const struct protoidlist *pl;
u_char protoid[5];
protoid[0] = 0;
@@ -817,7 +817,7 @@ static const struct etherlist {
static void
init_etherarray(void)
{
- register struct etherlist *el;
+ register const struct etherlist *el;
register struct enamemem *tp;
#ifdef USE_ETHER_NTOHOST
char name[256];
diff --git a/af.c b/af.c
index e3c77bf3..2c8a928e 100644
--- a/af.c
+++ b/af.c
@@ -28,7 +28,7 @@ static const char rcsid[] _U_ =
#include "interface.h"
#include "af.h"
-struct tok af_values[] = {
+const struct tok af_values[] = {
{ 0, "Reserved"},
{ AFNUM_INET, "IPv4"},
{ AFNUM_INET6, "IPv6"},
@@ -50,7 +50,7 @@ struct tok af_values[] = {
{ 0, NULL},
};
-struct tok bsd_af_values[] = {
+const struct tok bsd_af_values[] = {
{ BSD_AFNUM_INET, "IPv4" },
{ BSD_AFNUM_NS, "NS" },
{ BSD_AFNUM_ISO, "ISO" },
diff --git a/af.h b/af.h
index c036cef9..679cc8e5 100644
--- a/af.h
+++ b/af.h
@@ -17,8 +17,8 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
-extern struct tok af_values[];
-extern struct tok bsd_af_values[];
+extern const struct tok af_values[];
+extern const struct tok bsd_af_values[];
/* RFC1700 address family numbers */
#define AFNUM_INET 1