]>
The Tcpdump Group git mirrors - tcpdump/blob - print-decnet.c
2 * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 static const char rcsid
[] =
24 "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.29 2000-07-01 03:39:01 assar Exp $ (LBL)";
31 #include <sys/param.h>
33 #include <sys/socket.h>
40 #include <netdnet/dnetdb.h>
51 #include "interface.h"
52 #include "addrtoname.h"
55 static void print_decnet_ctlmsg(const union routehdr
*, u_int
);
56 static void print_t_info(int);
57 static void print_l1_routes(const char *, u_int
);
58 static void print_l2_routes(const char *, u_int
);
59 static void print_i_info(int);
60 static void print_elist(const char *, u_int
);
61 static void print_nsp(const u_char
*, u_int
);
62 static void print_reason(int);
64 static void pdata(u_char
*, int);
68 extern char *dnet_htoa(struct dn_naddr
*);
72 decnet_print(register const u_char
*ap
, register u_int length
,
73 register u_int caplen
)
75 static union routehdr rhcopy
;
76 register union routehdr
*rhp
= &rhcopy
;
79 u_int rhlen
, nsplen
, pktlen
;
82 if (length
< sizeof(struct shorthdr
)) {
83 (void)printf("[|decnet]");
87 pktlen
= EXTRACT_LE_16BITS(ap
);
89 rhlen
= min(length
, caplen
);
90 rhlen
= min(rhlen
, sizeof(*rhp
));
91 memcpy((char *)rhp
, (char *)&(ap
[sizeof(short)]), rhlen
);
93 mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
95 if (mflags
& RMF_PAD
) {
96 /* pad bytes of some sort in front of message */
97 u_int padlen
= mflags
& RMF_PADMASK
;
99 (void) printf("[pad:%d] ", padlen
);
103 rhlen
= min(length
, caplen
);
104 rhlen
= min(rhlen
, sizeof(*rhp
));
105 memcpy((char *)rhp
, (char *)&(ap
[sizeof(short)]), rhlen
);
106 mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
109 if (mflags
& RMF_FVER
) {
110 (void) printf("future-version-decnet");
111 default_print(ap
, length
);
115 /* is it a control message? */
116 if (mflags
& RMF_CTLMSG
) {
117 print_decnet_ctlmsg(rhp
, min(length
, caplen
));
121 switch (mflags
& RMF_MASK
) {
124 EXTRACT_LE_16BITS(rhp
->rh_long
.lg_dst
.dne_remote
.dne_nodeaddr
);
126 EXTRACT_LE_16BITS(rhp
->rh_long
.lg_src
.dne_remote
.dne_nodeaddr
);
127 hops
= EXTRACT_LE_8BITS(rhp
->rh_long
.lg_visits
);
128 nspp
= &(ap
[sizeof(short) + sizeof(struct longhdr
)]);
129 nsplen
= min((length
- sizeof(struct longhdr
)),
130 (caplen
- sizeof(struct longhdr
)));
133 dst
= EXTRACT_LE_16BITS(rhp
->rh_short
.sh_dst
);
134 src
= EXTRACT_LE_16BITS(rhp
->rh_short
.sh_src
);
135 hops
= (EXTRACT_LE_8BITS(rhp
->rh_short
.sh_visits
) & VIS_MASK
)+1;
136 nspp
= &(ap
[sizeof(short) + sizeof(struct shorthdr
)]);
137 nsplen
= min((length
- sizeof(struct shorthdr
)),
138 (caplen
- sizeof(struct shorthdr
)));
141 (void) printf("unknown message flags under mask");
142 default_print((u_char
*)ap
, length
);
146 (void)printf("%s > %s %d ",
147 dnaddr_string(src
), dnaddr_string(dst
), pktlen
);
149 if (mflags
& RMF_RQR
)
150 (void)printf("RQR ");
151 if (mflags
& RMF_RTS
)
152 (void)printf("RTS ");
155 (void)printf("%d hops ", hops
);
158 print_nsp(nspp
, nsplen
);
162 print_decnet_ctlmsg(register const union routehdr
*rhp
, u_int length
)
164 int mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
165 register union controlmsg
*cmp
= (union controlmsg
*)rhp
;
166 int src
, dst
, info
, blksize
, eco
, ueco
, hello
, other
, vers
;
167 etheraddr srcea
, rtea
;
169 char *rhpx
= (char *)rhp
;
171 switch (mflags
& RMF_CTLMASK
) {
173 (void)printf("init ");
174 src
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_src
);
175 info
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_info
);
176 blksize
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_blksize
);
177 vers
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_vers
);
178 eco
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_eco
);
179 ueco
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_ueco
);
180 hello
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_hello
);
183 "src %sblksize %d vers %d eco %d ueco %d hello %d",
184 dnaddr_string(src
), blksize
, vers
, eco
, ueco
,
188 (void)printf("verification ");
189 src
= EXTRACT_LE_16BITS(cmp
->cm_ver
.ve_src
);
190 other
= EXTRACT_LE_8BITS(cmp
->cm_ver
.ve_fcnval
);
191 (void)printf("src %s fcnval %o", dnaddr_string(src
), other
);
194 (void)printf("test ");
195 src
= EXTRACT_LE_16BITS(cmp
->cm_test
.te_src
);
196 other
= EXTRACT_LE_8BITS(cmp
->cm_test
.te_data
);
197 (void)printf("src %s data %o", dnaddr_string(src
), other
);
200 (void)printf("lev-1-routing ");
201 src
= EXTRACT_LE_16BITS(cmp
->cm_l1rou
.r1_src
);
202 (void)printf("src %s ", dnaddr_string(src
));
203 print_l1_routes(&(rhpx
[sizeof(struct l1rout
)]),
204 length
- sizeof(struct l1rout
));
207 (void)printf("lev-2-routing ");
208 src
= EXTRACT_LE_16BITS(cmp
->cm_l2rout
.r2_src
);
209 (void)printf("src %s ", dnaddr_string(src
));
210 print_l2_routes(&(rhpx
[sizeof(struct l2rout
)]),
211 length
- sizeof(struct l2rout
));
214 (void)printf("router-hello ");
215 vers
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_vers
);
216 eco
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_eco
);
217 ueco
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_ueco
);
218 memcpy((char *)&srcea
, (char *)&(cmp
->cm_rhello
.rh_src
),
220 src
= EXTRACT_LE_16BITS(srcea
.dne_remote
.dne_nodeaddr
);
221 info
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_info
);
222 blksize
= EXTRACT_LE_16BITS(cmp
->cm_rhello
.rh_blksize
);
223 priority
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_priority
);
224 hello
= EXTRACT_LE_16BITS(cmp
->cm_rhello
.rh_hello
);
227 "vers %d eco %d ueco %d src %s blksize %d pri %d hello %d",
228 vers
, eco
, ueco
, dnaddr_string(src
),
229 blksize
, priority
, hello
);
230 print_elist(&(rhpx
[sizeof(struct rhellomsg
)]),
231 length
- sizeof(struct rhellomsg
));
234 (void)printf("endnode-hello ");
235 vers
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_vers
);
236 eco
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_eco
);
237 ueco
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_ueco
);
238 memcpy((char *)&srcea
, (char *)&(cmp
->cm_ehello
.eh_src
),
240 src
= EXTRACT_LE_16BITS(srcea
.dne_remote
.dne_nodeaddr
);
241 info
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_info
);
242 blksize
= EXTRACT_LE_16BITS(cmp
->cm_ehello
.eh_blksize
);
244 memcpy((char *)&rtea
, (char *)&(cmp
->cm_ehello
.eh_router
),
246 dst
= EXTRACT_LE_16BITS(rtea
.dne_remote
.dne_nodeaddr
);
247 hello
= EXTRACT_LE_16BITS(cmp
->cm_ehello
.eh_hello
);
248 other
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_data
);
251 "vers %d eco %d ueco %d src %s blksize %d rtr %s hello %d data %o",
252 vers
, eco
, ueco
, dnaddr_string(src
),
253 blksize
, dnaddr_string(dst
), hello
, other
);
257 (void)printf("unknown control message");
258 default_print((u_char
*)rhp
, length
);
264 print_t_info(int info
)
266 int ntype
= info
& 3;
268 case 0: (void)printf("reserved-ntype? "); break;
269 case TI_L2ROUT
: (void)printf("l2rout "); break;
270 case TI_L1ROUT
: (void)printf("l1rout "); break;
271 case TI_ENDNODE
: (void)printf("endnode "); break;
274 (void)printf("verif ");
276 (void)printf("blo ");
280 print_l1_routes(const char *rp
, u_int len
)
286 /* The last short is a checksum */
287 while (len
> (3 * sizeof(short))) {
288 count
= EXTRACT_LE_16BITS(rp
);
290 return; /* seems to be bogus from here on */
292 len
-= sizeof(short);
293 id
= EXTRACT_LE_16BITS(rp
);
295 len
-= sizeof(short);
296 info
= EXTRACT_LE_16BITS(rp
);
298 len
-= sizeof(short);
299 (void)printf("{ids %d-%d cost %d hops %d} ", id
, id
+ count
,
300 RI_COST(info
), RI_HOPS(info
));
305 print_l2_routes(const char *rp
, u_int len
)
311 /* The last short is a checksum */
312 while (len
> (3 * sizeof(short))) {
313 count
= EXTRACT_LE_16BITS(rp
);
315 return; /* seems to be bogus from here on */
317 len
-= sizeof(short);
318 area
= EXTRACT_LE_16BITS(rp
);
320 len
-= sizeof(short);
321 info
= EXTRACT_LE_16BITS(rp
);
323 len
-= sizeof(short);
324 (void)printf("{areas %d-%d cost %d hops %d} ", area
, area
+ count
,
325 RI_COST(info
), RI_HOPS(info
));
330 print_i_info(int info
)
332 int ntype
= info
& II_TYPEMASK
;
334 case 0: (void)printf("reserved-ntype? "); break;
335 case II_L2ROUT
: (void)printf("l2rout "); break;
336 case II_L1ROUT
: (void)printf("l1rout "); break;
337 case II_ENDNODE
: (void)printf("endnode "); break;
340 (void)printf("verif ");
341 if (info
& II_NOMCAST
)
342 (void)printf("nomcast ");
344 (void)printf("blo ");
348 print_elist(const char *elp
, u_int len
)
350 /* Not enough examples available for me to debug this */
354 print_nsp(const u_char
*nspp
, u_int nsplen
)
356 const struct nsphdr
*nsphp
= (struct nsphdr
*)nspp
;
359 flags
= EXTRACT_LE_8BITS(nsphp
->nh_flags
);
360 dst
= EXTRACT_LE_16BITS(nsphp
->nh_dst
);
361 src
= EXTRACT_LE_16BITS(nsphp
->nh_src
);
363 switch (flags
& NSP_TYPEMASK
) {
365 switch (flags
& NSP_SUBMASK
) {
369 case MFS_BOM
+MFS_EOM
:
370 printf("data %d>%d ", src
, dst
);
372 struct seghdr
*shp
= (struct seghdr
*)nspp
;
377 u_int data_off
= sizeof(struct minseghdr
);
379 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
380 if (ack
& SGQ_ACK
) { /* acknum field */
381 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
382 (void)printf("nak %d ", ack
& SGQ_MASK
);
384 (void)printf("ack %d ", ack
& SGQ_MASK
);
385 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
386 data_off
+= sizeof(short);
387 if (ack
& SGQ_OACK
) { /* ackoth field */
388 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
389 (void)printf("onak %d ", ack
& SGQ_MASK
);
391 (void)printf("oack %d ", ack
& SGQ_MASK
);
392 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
393 data_off
+= sizeof(short);
396 (void)printf("seg %d ", ack
& SGQ_MASK
);
398 dp
= &(nspp
[data_off
]);
403 case MFS_ILS
+MFS_INT
:
406 struct seghdr
*shp
= (struct seghdr
*)nspp
;
411 u_int data_off
= sizeof(struct minseghdr
);
413 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
414 if (ack
& SGQ_ACK
) { /* acknum field */
415 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
416 (void)printf("nak %d ", ack
& SGQ_MASK
);
418 (void)printf("ack %d ", ack
& SGQ_MASK
);
419 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
420 data_off
+= sizeof(short);
421 if (ack
& SGQ_OACK
) { /* ackdat field */
422 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
423 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
425 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
426 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
427 data_off
+= sizeof(short);
430 (void)printf("seg %d ", ack
& SGQ_MASK
);
432 dp
= &(nspp
[data_off
]);
438 (void)printf("link-service %d>%d ", src
, dst
);
440 struct seghdr
*shp
= (struct seghdr
*)nspp
;
442 (struct lsmsg
*)&(nspp
[sizeof(struct seghdr
)]);
446 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
447 if (ack
& SGQ_ACK
) { /* acknum field */
448 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
449 (void)printf("nak %d ", ack
& SGQ_MASK
);
451 (void)printf("ack %d ", ack
& SGQ_MASK
);
452 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
453 if (ack
& SGQ_OACK
) { /* ackdat field */
454 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
455 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
457 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
458 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
461 (void)printf("seg %d ", ack
& SGQ_MASK
);
462 lsflags
= EXTRACT_LE_8BITS(lsmp
->ls_lsflags
);
463 fcval
= EXTRACT_LE_8BITS(lsmp
->ls_fcval
);
464 switch (lsflags
& LSI_MASK
) {
466 (void)printf("dat seg count %d ", fcval
);
467 switch (lsflags
& LSM_MASK
) {
471 (void)printf("donotsend-data ");
474 (void)printf("send-data ");
477 (void)printf("reserved-fcmod? %x", lsflags
);
482 (void)printf("intr req count %d ", fcval
);
485 (void)printf("reserved-fcval-int? %x", lsflags
);
491 (void)printf("reserved-subtype? %x %d > %d", flags
, src
, dst
);
496 switch (flags
& NSP_SUBMASK
) {
498 (void)printf("data-ack %d>%d ", src
, dst
);
500 struct ackmsg
*amp
= (struct ackmsg
*)nspp
;
503 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[0]);
504 if (ack
& SGQ_ACK
) { /* acknum field */
505 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
506 (void)printf("nak %d ", ack
& SGQ_MASK
);
508 (void)printf("ack %d ", ack
& SGQ_MASK
);
509 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[1]);
510 if (ack
& SGQ_OACK
) { /* ackoth field */
511 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
512 (void)printf("onak %d ", ack
& SGQ_MASK
);
514 (void)printf("oack %d ", ack
& SGQ_MASK
);
520 (void)printf("ils-ack %d>%d ", src
, dst
);
522 struct ackmsg
*amp
= (struct ackmsg
*)nspp
;
525 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[0]);
526 if (ack
& SGQ_ACK
) { /* acknum field */
527 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
528 (void)printf("nak %d ", ack
& SGQ_MASK
);
530 (void)printf("ack %d ", ack
& SGQ_MASK
);
531 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[1]);
532 if (ack
& SGQ_OACK
) { /* ackdat field */
533 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
534 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
536 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
542 (void)printf("conn-ack %d", dst
);
545 (void)printf("reserved-acktype? %x %d > %d", flags
, src
, dst
);
550 switch (flags
& NSP_SUBMASK
) {
553 if ((flags
& NSP_SUBMASK
) == MFS_CI
)
554 (void)printf("conn-initiate ");
556 (void)printf("retrans-conn-initiate ");
557 (void)printf("%d>%d ", src
, dst
);
559 struct cimsg
*cimp
= (struct cimsg
*)nspp
;
560 int services
, info
, segsize
;
565 services
= EXTRACT_LE_8BITS(cimp
->ci_services
);
566 info
= EXTRACT_LE_8BITS(cimp
->ci_info
);
567 segsize
= EXTRACT_LE_16BITS(cimp
->ci_segsize
);
569 switch (services
& COS_MASK
) {
573 (void)printf("seg ");
576 (void)printf("msg ");
579 (void)printf("crypt ");
582 switch (info
& COI_MASK
) {
584 (void)printf("ver 3.2 ");
587 (void)printf("ver 3.1 ");
590 (void)printf("ver 4.0 ");
593 (void)printf("ver 4.1 ");
596 (void)printf("segsize %d ", segsize
);
598 dp
= &(nspp
[sizeof(struct cimsg
)]);
599 pdata(dp
, nsplen
- sizeof(struct cimsg
));
604 (void)printf("conn-confirm %d>%d ", src
, dst
);
606 struct ccmsg
*ccmp
= (struct ccmsg
*)nspp
;
608 u_int segsize
, optlen
;
613 services
= EXTRACT_LE_8BITS(ccmp
->cc_services
);
614 info
= EXTRACT_LE_8BITS(ccmp
->cc_info
);
615 segsize
= EXTRACT_LE_16BITS(ccmp
->cc_segsize
);
616 optlen
= EXTRACT_LE_8BITS(ccmp
->cc_optlen
);
618 switch (services
& COS_MASK
) {
622 (void)printf("seg ");
625 (void)printf("msg ");
628 (void)printf("crypt ");
631 switch (info
& COI_MASK
) {
633 (void)printf("ver 3.2 ");
636 (void)printf("ver 3.1 ");
639 (void)printf("ver 4.0 ");
642 (void)printf("ver 4.1 ");
645 (void)printf("segsize %d ", segsize
);
647 (void)printf("optlen %d ", optlen
);
649 optlen
= min(optlen
, nsplen
- sizeof(struct ccmsg
));
650 dp
= &(nspp
[sizeof(struct ccmsg
)]);
657 (void)printf("disconn-initiate %d>%d ", src
, dst
);
659 struct dimsg
*dimp
= (struct dimsg
*)nspp
;
666 reason
= EXTRACT_LE_16BITS(dimp
->di_reason
);
667 optlen
= EXTRACT_LE_8BITS(dimp
->di_optlen
);
669 print_reason(reason
);
671 (void)printf("optlen %d ", optlen
);
673 optlen
= min(optlen
, nsplen
- sizeof(struct dimsg
));
674 dp
= &(nspp
[sizeof(struct dimsg
)]);
681 (void)printf("disconn-confirm %d>%d ", src
, dst
);
683 struct dcmsg
*dcmp
= (struct dcmsg
*)nspp
;
686 reason
= EXTRACT_LE_16BITS(dcmp
->dc_reason
);
688 print_reason(reason
);
692 (void)printf("reserved-ctltype? %x %d > %d", flags
, src
, dst
);
697 (void)printf("reserved-type? %x %d > %d", flags
, src
, dst
);
702 static struct tok reason2str
[] = {
703 { UC_OBJREJECT
, "object rejected connect" },
704 { UC_RESOURCES
, "insufficient resources" },
705 { UC_NOSUCHNODE
, "unrecognized node name" },
706 { DI_SHUT
, "node is shutting down" },
707 { UC_NOSUCHOBJ
, "unrecognized object" },
708 { UC_INVOBJFORMAT
, "invalid object name format" },
709 { UC_OBJTOOBUSY
, "object too busy" },
710 { DI_PROTOCOL
, "protocol error discovered" },
711 { DI_TPA
, "third party abort" },
712 { UC_USERABORT
, "user abort" },
713 { UC_INVNODEFORMAT
, "invalid node name format" },
714 { UC_LOCALSHUT
, "local node shutting down" },
715 { DI_LOCALRESRC
, "insufficient local resources" },
716 { DI_REMUSERRESRC
, "insufficient remote user resources" },
717 { UC_ACCESSREJECT
, "invalid access control information" },
718 { DI_BADACCNT
, "bad ACCOUNT information" },
719 { UC_NORESPONSE
, "no response from object" },
720 { UC_UNREACHABLE
, "node unreachable" },
721 { DC_NOLINK
, "no link terminate" },
722 { DC_COMPLETE
, "disconnect complete" },
723 { DI_BADIMAGE
, "bad image data in connect" },
724 { DI_SERVMISMATCH
, "cryptographic service mismatch" },
729 print_reason(register int reason
)
731 printf("%s ", tok2str(reason2str
, "reason-%d", reason
));
735 dnnum_string(u_short dnaddr
)
739 int area
= (u_short
)(dnaddr
& AREAMASK
) >> AREASHIFT
;
740 int node
= dnaddr
& NODEMASK
;
742 str
= (char *)malloc(siz
= sizeof("00.0000"));
744 error("dnnum_string: malloc");
745 snprintf(str
, siz
, "%d.%d", area
, node
);
750 dnname_string(u_short dnaddr
)
755 dna
.a_len
= sizeof(short);
756 memcpy((char *)dna
.a_addr
, (char *)&dnaddr
, sizeof(short));
757 return (savestr(dnet_htoa(&dna
)));
759 return(dnnum_string(dnaddr
)); /* punt */
765 pdata(u_char
*dp
, u_int maxlen
)
775 printf("\\%o", c
& 0xFF);