2004-03-31 09:17:26 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2002 WIDE Project.
|
|
|
|
* All rights reserved.
|
2015-01-06 19:03:11 +00:00
|
|
|
*
|
2004-03-31 09:17:26 +00:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. Neither the name of the project nor the names of its contributors
|
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
2015-01-06 19:03:11 +00:00
|
|
|
*
|
2004-03-31 09:17:26 +00:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
/* \summary: IPv6 mobility printer */
|
2017-09-18 04:10:54 +00:00
|
|
|
/* RFC 3775 */
|
2017-01-31 19:17:06 +00:00
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2023-05-10 15:02:34 +00:00
|
|
|
#include <config.h>
|
2004-03-31 09:17:26 +00:00
|
|
|
#endif
|
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
#include "netdissect-stdinc.h"
|
2004-03-31 09:17:26 +00:00
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
#include "netdissect.h"
|
2004-03-31 09:17:26 +00:00
|
|
|
#include "addrtoname.h"
|
2017-01-31 19:17:06 +00:00
|
|
|
#include "extract.h"
|
|
|
|
|
2017-09-18 04:10:54 +00:00
|
|
|
#include "ip6.h"
|
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
/* Mobility header */
|
|
|
|
struct ip6_mobility {
|
2023-05-10 15:02:34 +00:00
|
|
|
nd_uint8_t ip6m_pproto; /* following payload protocol (for PG) */
|
|
|
|
nd_uint8_t ip6m_len; /* length in units of 8 octets */
|
|
|
|
nd_uint8_t ip6m_type; /* message type */
|
|
|
|
nd_uint8_t reserved; /* reserved */
|
|
|
|
nd_uint16_t ip6m_cksum; /* sum of IPv6 pseudo-header and MH */
|
2004-03-31 09:17:26 +00:00
|
|
|
union {
|
2023-05-10 15:02:34 +00:00
|
|
|
nd_uint16_t ip6m_un_data16[1]; /* type-specific field */
|
|
|
|
nd_uint8_t ip6m_un_data8[2]; /* type-specific field */
|
2004-03-31 09:17:26 +00:00
|
|
|
} ip6m_dataun;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ip6m_data16 ip6m_dataun.ip6m_un_data16
|
|
|
|
#define ip6m_data8 ip6m_dataun.ip6m_un_data8
|
|
|
|
|
|
|
|
#define IP6M_MINLEN 8
|
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
/* https://www.iana.org/assignments/mobility-parameters/mobility-parameters.xhtml */
|
2015-01-06 19:03:11 +00:00
|
|
|
|
2004-03-31 09:17:26 +00:00
|
|
|
/* message type */
|
|
|
|
#define IP6M_BINDING_REQUEST 0 /* Binding Refresh Request */
|
|
|
|
#define IP6M_HOME_TEST_INIT 1 /* Home Test Init */
|
|
|
|
#define IP6M_CAREOF_TEST_INIT 2 /* Care-of Test Init */
|
|
|
|
#define IP6M_HOME_TEST 3 /* Home Test */
|
|
|
|
#define IP6M_CAREOF_TEST 4 /* Care-of Test */
|
|
|
|
#define IP6M_BINDING_UPDATE 5 /* Binding Update */
|
|
|
|
#define IP6M_BINDING_ACK 6 /* Binding Acknowledgement */
|
|
|
|
#define IP6M_BINDING_ERROR 7 /* Binding Error */
|
2015-07-06 02:16:08 +00:00
|
|
|
#define IP6M_MAX 7
|
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
static const struct tok ip6m_str[] = {
|
|
|
|
{ IP6M_BINDING_REQUEST, "BRR" },
|
|
|
|
{ IP6M_HOME_TEST_INIT, "HoTI" },
|
|
|
|
{ IP6M_CAREOF_TEST_INIT, "CoTI" },
|
|
|
|
{ IP6M_HOME_TEST, "HoT" },
|
|
|
|
{ IP6M_CAREOF_TEST, "CoT" },
|
|
|
|
{ IP6M_BINDING_UPDATE, "BU" },
|
|
|
|
{ IP6M_BINDING_ACK, "BA" },
|
|
|
|
{ IP6M_BINDING_ERROR, "BE" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2015-07-06 02:16:08 +00:00
|
|
|
static const unsigned ip6m_hdrlen[IP6M_MAX + 1] = {
|
|
|
|
IP6M_MINLEN, /* IP6M_BINDING_REQUEST */
|
|
|
|
IP6M_MINLEN + 8, /* IP6M_HOME_TEST_INIT */
|
|
|
|
IP6M_MINLEN + 8, /* IP6M_CAREOF_TEST_INIT */
|
|
|
|
IP6M_MINLEN + 16, /* IP6M_HOME_TEST */
|
|
|
|
IP6M_MINLEN + 16, /* IP6M_CAREOF_TEST */
|
|
|
|
IP6M_MINLEN + 4, /* IP6M_BINDING_UPDATE */
|
|
|
|
IP6M_MINLEN + 4, /* IP6M_BINDING_ACK */
|
|
|
|
IP6M_MINLEN + 16, /* IP6M_BINDING_ERROR */
|
|
|
|
};
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
/* Mobility Header Options */
|
|
|
|
#define IP6MOPT_MINLEN 2
|
|
|
|
#define IP6MOPT_PAD1 0x0 /* Pad1 */
|
|
|
|
#define IP6MOPT_PADN 0x1 /* PadN */
|
|
|
|
#define IP6MOPT_REFRESH 0x2 /* Binding Refresh Advice */
|
|
|
|
#define IP6MOPT_REFRESH_MINLEN 4
|
|
|
|
#define IP6MOPT_ALTCOA 0x3 /* Alternate Care-of Address */
|
|
|
|
#define IP6MOPT_ALTCOA_MINLEN 18
|
|
|
|
#define IP6MOPT_NONCEID 0x4 /* Nonce Indices */
|
|
|
|
#define IP6MOPT_NONCEID_MINLEN 6
|
|
|
|
#define IP6MOPT_AUTH 0x5 /* Binding Authorization Data */
|
|
|
|
#define IP6MOPT_AUTH_MINLEN 12
|
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
static const struct tok ip6m_binding_update_bits [] = {
|
|
|
|
{ 0x08, "A" },
|
|
|
|
{ 0x04, "H" },
|
|
|
|
{ 0x02, "L" },
|
|
|
|
{ 0x01, "K" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2017-01-31 19:17:06 +00:00
|
|
|
static int
|
2015-01-06 19:03:11 +00:00
|
|
|
mobility_opt_print(netdissect_options *ndo,
|
|
|
|
const u_char *bp, const unsigned len)
|
2004-03-31 09:17:26 +00:00
|
|
|
{
|
2015-01-06 19:03:11 +00:00
|
|
|
unsigned i, optlen;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
for (i = 0; i < len; i += optlen) {
|
2023-05-10 15:02:34 +00:00
|
|
|
if (GET_U_1(bp + i) == IP6MOPT_PAD1)
|
2004-03-31 09:17:26 +00:00
|
|
|
optlen = 1;
|
|
|
|
else {
|
2015-07-06 02:16:08 +00:00
|
|
|
if (i + 1 < len) {
|
2023-05-10 15:02:34 +00:00
|
|
|
optlen = GET_U_1(bp + i + 1) + 2;
|
2015-07-06 02:16:08 +00:00
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
else
|
|
|
|
goto trunc;
|
|
|
|
}
|
|
|
|
if (i + optlen > len)
|
|
|
|
goto trunc;
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_TCHECK_1(bp + i + optlen);
|
2004-03-31 09:17:26 +00:00
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
switch (GET_U_1(bp + i)) {
|
2004-03-31 09:17:26 +00:00
|
|
|
case IP6MOPT_PAD1:
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(pad1)");
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
case IP6MOPT_PADN:
|
|
|
|
if (len - i < IP6MOPT_MINLEN) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(padn: trunc)");
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(padn)");
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
case IP6MOPT_REFRESH:
|
|
|
|
if (len - i < IP6MOPT_REFRESH_MINLEN) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(refresh: trunc)");
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
|
|
|
/* units of 4 secs */
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(refresh: %u)",
|
|
|
|
GET_BE_U_2(bp + i + 2) << 2);
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
case IP6MOPT_ALTCOA:
|
|
|
|
if (len - i < IP6MOPT_ALTCOA_MINLEN) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(altcoa: trunc)");
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(alt-CoA: %s)", GET_IP6ADDR_STRING(bp + i + 2));
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
case IP6MOPT_NONCEID:
|
|
|
|
if (len - i < IP6MOPT_NONCEID_MINLEN) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(ni: trunc)");
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(ni: ho=0x%04x co=0x%04x)",
|
|
|
|
GET_BE_U_2(bp + i + 2),
|
|
|
|
GET_BE_U_2(bp + i + 4));
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
case IP6MOPT_AUTH:
|
|
|
|
if (len - i < IP6MOPT_AUTH_MINLEN) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(auth: trunc)");
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(auth)");
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (len - i < IP6MOPT_MINLEN) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(sopt_type %u: trunc)",
|
|
|
|
GET_U_1(bp + i));
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(type-0x%02x: len=%u)", GET_U_1(bp + i),
|
|
|
|
GET_U_1(bp + i + 1));
|
2004-03-31 09:17:26 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2017-01-31 19:17:06 +00:00
|
|
|
return 0;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
trunc:
|
2017-01-31 19:17:06 +00:00
|
|
|
return 1;
|
2004-03-31 09:17:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Mobility Header
|
|
|
|
*/
|
|
|
|
int
|
2015-01-06 19:03:11 +00:00
|
|
|
mobility_print(netdissect_options *ndo,
|
|
|
|
const u_char *bp, const u_char *bp2 _U_)
|
2004-03-31 09:17:26 +00:00
|
|
|
{
|
|
|
|
const struct ip6_mobility *mh;
|
|
|
|
const u_char *ep;
|
2015-01-06 19:03:11 +00:00
|
|
|
unsigned mhlen, hlen;
|
|
|
|
uint8_t type;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
ndo->ndo_protocol = "mobility";
|
2017-01-31 19:17:06 +00:00
|
|
|
mh = (const struct ip6_mobility *)bp;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
/* 'ep' points to the end of available data. */
|
2015-01-06 19:03:11 +00:00
|
|
|
ep = ndo->ndo_snapend;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
if (!ND_TTEST_1(mh->ip6m_len)) {
|
2004-03-31 09:17:26 +00:00
|
|
|
/*
|
|
|
|
* There's not enough captured data to include the
|
|
|
|
* mobility header length.
|
|
|
|
*
|
|
|
|
* Our caller expects us to return the length, however,
|
|
|
|
* so return a value that will run to the end of the
|
|
|
|
* captured data.
|
|
|
|
*
|
|
|
|
* XXX - "ip6_print()" doesn't do anything with the
|
|
|
|
* returned length, however, as it breaks out of the
|
|
|
|
* header-processing loop.
|
|
|
|
*/
|
2023-05-10 15:02:34 +00:00
|
|
|
mhlen = (unsigned)(ep - bp);
|
2004-03-31 09:17:26 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
mhlen = (GET_U_1(mh->ip6m_len) + 1) << 3;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
/* XXX ip6m_cksum */
|
|
|
|
|
2023-05-10 15:02:34 +00:00
|
|
|
type = GET_U_1(mh->ip6m_type);
|
2015-07-06 02:16:08 +00:00
|
|
|
if (type <= IP6M_MAX && mhlen < ip6m_hdrlen[type]) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("(header length %u is too small for type %u)", mhlen, type);
|
2015-07-06 02:16:08 +00:00
|
|
|
goto trunc;
|
|
|
|
}
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT("mobility: %s", tok2str(ip6m_str, "type-#%u", type));
|
2004-03-31 09:17:26 +00:00
|
|
|
switch (type) {
|
|
|
|
case IP6M_BINDING_REQUEST:
|
|
|
|
hlen = IP6M_MINLEN;
|
|
|
|
break;
|
|
|
|
case IP6M_HOME_TEST_INIT:
|
|
|
|
case IP6M_CAREOF_TEST_INIT:
|
|
|
|
hlen = IP6M_MINLEN;
|
2017-01-31 19:17:06 +00:00
|
|
|
if (ndo->ndo_vflag) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" %s Init Cookie=%08x:%08x",
|
2004-03-31 09:17:26 +00:00
|
|
|
type == IP6M_HOME_TEST_INIT ? "Home" : "Care-of",
|
2023-05-10 15:02:34 +00:00
|
|
|
GET_BE_U_4(bp + hlen),
|
|
|
|
GET_BE_U_4(bp + hlen + 4));
|
2004-03-31 09:17:26 +00:00
|
|
|
}
|
|
|
|
hlen += 8;
|
|
|
|
break;
|
|
|
|
case IP6M_HOME_TEST:
|
|
|
|
case IP6M_CAREOF_TEST:
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" nonce id=0x%x", GET_BE_U_2(mh->ip6m_data16[0]));
|
2004-03-31 09:17:26 +00:00
|
|
|
hlen = IP6M_MINLEN;
|
2017-01-31 19:17:06 +00:00
|
|
|
if (ndo->ndo_vflag) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" %s Init Cookie=%08x:%08x",
|
2004-03-31 09:17:26 +00:00
|
|
|
type == IP6M_HOME_TEST ? "Home" : "Care-of",
|
2023-05-10 15:02:34 +00:00
|
|
|
GET_BE_U_4(bp + hlen),
|
|
|
|
GET_BE_U_4(bp + hlen + 4));
|
2004-03-31 09:17:26 +00:00
|
|
|
}
|
|
|
|
hlen += 8;
|
2017-01-31 19:17:06 +00:00
|
|
|
if (ndo->ndo_vflag) {
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" %s Keygen Token=%08x:%08x",
|
2004-03-31 09:17:26 +00:00
|
|
|
type == IP6M_HOME_TEST ? "Home" : "Care-of",
|
2023-05-10 15:02:34 +00:00
|
|
|
GET_BE_U_4(bp + hlen),
|
|
|
|
GET_BE_U_4(bp + hlen + 4));
|
2004-03-31 09:17:26 +00:00
|
|
|
}
|
|
|
|
hlen += 8;
|
|
|
|
break;
|
|
|
|
case IP6M_BINDING_UPDATE:
|
2023-05-10 15:02:34 +00:00
|
|
|
{
|
|
|
|
int bits;
|
|
|
|
ND_PRINT(" seq#=%u", GET_BE_U_2(mh->ip6m_data16[0]));
|
2004-03-31 09:17:26 +00:00
|
|
|
hlen = IP6M_MINLEN;
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_TCHECK_2(bp + hlen);
|
|
|
|
bits = (GET_U_1(bp + hlen) & 0xf0) >> 4;
|
|
|
|
if (bits) {
|
|
|
|
ND_PRINT(" ");
|
|
|
|
ND_PRINT("%s",
|
|
|
|
bittok2str_nosep(ip6m_binding_update_bits,
|
|
|
|
"bits-#0x%x", bits));
|
2017-09-18 04:10:54 +00:00
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
/* Reserved (4bits) */
|
|
|
|
hlen += 1;
|
|
|
|
/* Reserved (8bits) */
|
|
|
|
hlen += 1;
|
|
|
|
/* units of 4 secs */
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" lifetime=%u", GET_BE_U_2(bp + hlen) << 2);
|
2004-03-31 09:17:26 +00:00
|
|
|
hlen += 2;
|
|
|
|
break;
|
2023-05-10 15:02:34 +00:00
|
|
|
}
|
2004-03-31 09:17:26 +00:00
|
|
|
case IP6M_BINDING_ACK:
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" status=%u", GET_U_1(mh->ip6m_data8[0]));
|
|
|
|
if (GET_U_1(mh->ip6m_data8[1]) & 0x80)
|
|
|
|
ND_PRINT(" K");
|
2004-03-31 09:17:26 +00:00
|
|
|
/* Reserved (7bits) */
|
|
|
|
hlen = IP6M_MINLEN;
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" seq#=%u", GET_BE_U_2(bp + hlen));
|
2004-03-31 09:17:26 +00:00
|
|
|
hlen += 2;
|
|
|
|
/* units of 4 secs */
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" lifetime=%u", GET_BE_U_2(bp + hlen) << 2);
|
2004-03-31 09:17:26 +00:00
|
|
|
hlen += 2;
|
|
|
|
break;
|
|
|
|
case IP6M_BINDING_ERROR:
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" status=%u", GET_U_1(mh->ip6m_data8[0]));
|
2004-03-31 09:17:26 +00:00
|
|
|
/* Reserved */
|
|
|
|
hlen = IP6M_MINLEN;
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" homeaddr %s", GET_IP6ADDR_STRING(bp + hlen));
|
2004-03-31 09:17:26 +00:00
|
|
|
hlen += 16;
|
|
|
|
break;
|
|
|
|
default:
|
2023-05-10 15:02:34 +00:00
|
|
|
ND_PRINT(" len=%u", GET_U_1(mh->ip6m_len));
|
2004-03-31 09:17:26 +00:00
|
|
|
return(mhlen);
|
|
|
|
break;
|
|
|
|
}
|
2017-01-31 19:17:06 +00:00
|
|
|
if (ndo->ndo_vflag)
|
2023-05-10 15:02:34 +00:00
|
|
|
if (mobility_opt_print(ndo, bp + hlen, mhlen - hlen))
|
|
|
|
goto trunc;
|
2004-03-31 09:17:26 +00:00
|
|
|
|
|
|
|
return(mhlen);
|
|
|
|
|
|
|
|
trunc:
|
2023-05-10 15:02:34 +00:00
|
|
|
nd_print_trunc(ndo);
|
2017-09-18 04:10:54 +00:00
|
|
|
return(-1);
|
2004-03-31 09:17:26 +00:00
|
|
|
}
|