};
static int
-ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
time_t t;
struct tm *tm;
char buf[BUFSIZE];
}
static int
-ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
if (cp + 4 != ep)
goto corrupt;
ND_TCHECK2(*cp, 4);
}
static int
-ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
goto corrupt;
ND_TCHECK2(*cp, 16);
#ifdef INET6
- ND_PRINT((ndo, "%s%s", sep, ip6addr_string(cp)));
+ ND_PRINT((ndo, "%s%s", sep, ip6addr_string(ndo, cp)));
#else
ND_PRINT((ndo, "%s(compiled w/o IPv6)", sep));
#endif /* INET6 */
}
static int
-ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
if (cp + 4 > ep)
goto corrupt;
ND_TCHECK2(*cp, 4);
- ND_PRINT((ndo, "%s%s", sep, ipaddr_string(cp)));
+ ND_PRINT((ndo, "%s%s", sep, ipaddr_string(ndo, cp)));
cp += 4;
sep = ", ";
}
}
static int
-ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
goto corrupt;
ND_TCHECK2(*cp, 17);
#ifdef INET6
- ND_PRINT((ndo, "%s%s/%u", sep, ip6addr_string(cp), *(cp + 16)));
+ ND_PRINT((ndo, "%s%s/%u", sep, ip6addr_string(ndo, cp), *(cp + 16)));
#else
ND_PRINT((ndo, "%s(compiled w/o IPv6)/%u", sep, *(cp + 16)));
#endif /* INET6 */
}
static int
-ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
if (cp + 5 > ep)
goto corrupt;
ND_TCHECK2(*cp, 5);
- ND_PRINT((ndo, "%s%s/%u", sep, ipaddr_string(cp), *(cp + 4)));
+ ND_PRINT((ndo, "%s%s/%u", sep, ipaddr_string(ndo, cp), *(cp + 4)));
cp += 5;
sep = ", ";
}
};
static void
-ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
uint8_t option_no, option_len;
while (cp < ep) {
}
static void
-ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
uint8_t type, mbz;
uint16_t body_len;
}
void
-ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len) {
+ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len)
+{
const u_char *ep = cp + len;
uint8_t version;
cp += 4;
/* Source Id */
ND_TCHECK2(*cp, 8);
- ND_PRINT((ndo, ", Source Id %s", linkaddr_string(cp, 0, 8)));
+ ND_PRINT((ndo, ", Source Id %s", linkaddr_string(ndo, cp, 0, 8)));
cp += 8;
/* Destination Id */
ND_TCHECK2(*cp, 8);
- ND_PRINT((ndo, ", Destination Id %s", linkaddr_string(cp, 0, 8)));
+ ND_PRINT((ndo, ", Destination Id %s", linkaddr_string(ndo, cp, 0, 8)));
cp += 8;
}
/* Body */
trunc:
ND_PRINT((ndo, "%s", tstr));
}
-