#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.34 2002-09-05 00:43:21 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.36 2002-12-11 07:14:03 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
if (p[0] & 0x80)
totlen = 4;
else
- totlen = 4 + ntohs(q[1]);
+ totlen = 4 + EXTRACT_16BITS(&q[1]);
if (ep < p + totlen) {
printf("[|attr]");
return ep + 1;
}
printf("(");
- t = ntohs(q[0]) & 0x7fff;
+ t = EXTRACT_16BITS(&q[0]) & 0x7fff;
if (map && t < nmap && map[t].type)
printf("type=%s ", map[t].type);
else
printf("type=#%d ", t);
if (p[0] & 0x80) {
printf("value=");
- v = ntohs(q[1]);
+ v = EXTRACT_16BITS(&q[1]);
if (map && t < nmap && v < map[t].nvalue && map[t].value[v])
printf("%s", map[t].value[v]);
else
rawprint((caddr_t)&q[1], 2);
} else {
- printf("len=%d value=", ntohs(q[1]));
- rawprint((caddr_t)&p[4], ntohs(q[1]));
+ printf("len=%d value=", EXTRACT_16BITS(&q[1]));
+ rawprint((caddr_t)&p[4], EXTRACT_16BITS(&q[1]));
}
printf(")");
return p + totlen;
if (p[0] & 0x80)
totlen = 4;
else
- totlen = 4 + ntohs(q[1]);
+ totlen = 4 + EXTRACT_16BITS(&q[1]);
if (ep < p + totlen) {
printf("[|attr]");
return ep + 1;
}
printf("(");
- t = ntohs(q[0]) & 0x7fff;
+ t = EXTRACT_16BITS(&q[0]) & 0x7fff;
printf("type=#%d ", t);
if (p[0] & 0x80) {
printf("value=");
t = q[1];
rawprint((caddr_t)&q[1], 2);
} else {
- printf("len=%d value=", ntohs(q[1]));
- rawprint((caddr_t)&p[2], ntohs(q[1]));
+ printf("len=%d value=", EXTRACT_16BITS(&q[1]));
+ rawprint((caddr_t)&p[2], EXTRACT_16BITS(&q[1]));
}
printf(")");
return p + totlen;
static const u_char *
isakmp_sa_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi0, u_int32_t proto0, int depth)
+ u_int32_t doi0 _U_, u_int32_t proto0, int depth)
{
const struct isakmp_pl_sa *p;
struct isakmp_pl_sa sa;
static const u_char *
isakmp_p_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi0, u_int32_t proto0, int depth)
+ u_int32_t doi0, u_int32_t proto0 _U_, int depth)
{
const struct isakmp_pl_p *p;
struct isakmp_pl_p prop;
};
static const u_char *
-isakmp_t_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi, u_int32_t proto, int depth)
+isakmp_t_print(const struct isakmp_gen *ext, const u_char *ep,
+ u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto,
+ int depth _U_)
{
const struct isakmp_pl_t *p;
struct isakmp_pl_t t;
}
static const u_char *
-isakmp_ke_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi, u_int32_t proto, int depth)
+isakmp_ke_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+ int depth _U_)
{
struct isakmp_gen e;
}
static const u_char *
-isakmp_id_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi, u_int32_t proto, int depth)
+isakmp_id_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase, u_int32_t doi _U_, u_int32_t proto _U_,
+ int depth _U_)
{
#define USE_IPSECDOI_IN_PHASE1 1
const struct isakmp_pl_id *p;
}
static const u_char *
-isakmp_cert_print(const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi0, u_int32_t proto0, int depth)
+isakmp_cert_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi0 _U_, u_int32_t proto0 _U_,
+ int depth _U_)
{
const struct isakmp_pl_cert *p;
struct isakmp_pl_cert cert;
}
static const u_char *
-isakmp_cr_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi0, u_int32_t proto0, int depth)
+isakmp_cr_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi0 _U_, u_int32_t proto0 _U_,
+ int depth _U_)
{
const struct isakmp_pl_cert *p;
struct isakmp_pl_cert cert;
}
static const u_char *
-isakmp_hash_print(const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_hash_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+ int depth _U_)
{
struct isakmp_gen e;
}
static const u_char *
-isakmp_sig_print(const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_sig_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+ int depth _U_)
{
struct isakmp_gen e;
}
static const u_char *
-isakmp_nonce_print(const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_nonce_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+ int depth _U_)
{
struct isakmp_gen e;
static const u_char *
isakmp_n_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi0, u_int32_t proto0, int depth)
+ u_int32_t doi0 _U_, u_int32_t proto0 _U_, int depth)
{
struct isakmp_pl_n *p, n;
const u_char *cp;
}
static const u_char *
-isakmp_d_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
- u_int32_t doi0, u_int32_t proto0, int depth)
+isakmp_d_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi0 _U_, u_int32_t proto0 _U_,
+ int depth _U_)
{
const struct isakmp_pl_d *p;
struct isakmp_pl_d d;
}
static const u_char *
-isakmp_vid_print(const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_vid_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+ int depth _U_)
{
struct isakmp_gen e;