]>
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.26 1999-10-07 23:47:11 mcr Exp $ (LBL)";
27 #include <sys/param.h>
29 #include <sys/socket.h>
38 #include <netdnet/dnetdb.h>
52 #include "interface.h"
53 #include "addrtoname.h"
56 static void print_decnet_ctlmsg(const union routehdr
*, u_int
);
57 static void print_t_info(int);
58 static void print_l1_routes(const char *, u_int
);
59 static void print_l2_routes(const char *, u_int
);
60 static void print_i_info(int);
61 static void print_elist(const char *, u_int
);
62 static void print_nsp(const u_char
*, u_int
);
63 static void print_reason(int);
65 static void pdata(u_char
*, int);
69 extern char *dnet_htoa(struct dn_naddr
*);
73 decnet_print(register const u_char
*ap
, register u_int length
,
74 register u_int caplen
)
76 static union routehdr rhcopy
;
77 register union routehdr
*rhp
= &rhcopy
;
80 u_int rhlen
, nsplen
, pktlen
;
83 if (length
< sizeof(struct shorthdr
)) {
84 (void)printf("[|decnet]");
88 pktlen
= EXTRACT_LE_16BITS(ap
);
90 rhlen
= min(length
, caplen
);
91 rhlen
= min(rhlen
, sizeof(*rhp
));
92 memcpy((char *)rhp
, (char *)&(ap
[sizeof(short)]), rhlen
);
94 mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
96 if (mflags
& RMF_PAD
) {
97 /* pad bytes of some sort in front of message */
98 u_int padlen
= mflags
& RMF_PADMASK
;
100 (void) printf("[pad:%d] ", padlen
);
104 rhlen
= min(length
, caplen
);
105 rhlen
= min(rhlen
, sizeof(*rhp
));
106 memcpy((char *)rhp
, (char *)&(ap
[sizeof(short)]), rhlen
);
107 mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
110 if (mflags
& RMF_FVER
) {
111 (void) printf("future-version-decnet");
112 default_print(ap
, length
);
116 /* is it a control message? */
117 if (mflags
& RMF_CTLMSG
) {
118 print_decnet_ctlmsg(rhp
, min(length
, caplen
));
122 switch (mflags
& RMF_MASK
) {
125 EXTRACT_LE_16BITS(rhp
->rh_long
.lg_dst
.dne_remote
.dne_nodeaddr
);
127 EXTRACT_LE_16BITS(rhp
->rh_long
.lg_src
.dne_remote
.dne_nodeaddr
);
128 hops
= EXTRACT_LE_8BITS(rhp
->rh_long
.lg_visits
);
129 nspp
= &(ap
[sizeof(short) + sizeof(struct longhdr
)]);
130 nsplen
= min((length
- sizeof(struct longhdr
)),
131 (caplen
- sizeof(struct longhdr
)));
134 dst
= EXTRACT_LE_16BITS(rhp
->rh_short
.sh_dst
);
135 src
= EXTRACT_LE_16BITS(rhp
->rh_short
.sh_src
);
136 hops
= (EXTRACT_LE_8BITS(rhp
->rh_short
.sh_visits
) & VIS_MASK
)+1;
137 nspp
= &(ap
[sizeof(short) + sizeof(struct shorthdr
)]);
138 nsplen
= min((length
- sizeof(struct shorthdr
)),
139 (caplen
- sizeof(struct shorthdr
)));
142 (void) printf("unknown message flags under mask");
143 default_print((u_char
*)ap
, length
);
147 (void)printf("%s > %s %d ",
148 dnaddr_string(src
), dnaddr_string(dst
), pktlen
);
150 if (mflags
& RMF_RQR
)
151 (void)printf("RQR ");
152 if (mflags
& RMF_RTS
)
153 (void)printf("RTS ");
156 (void)printf("%d hops ", hops
);
159 print_nsp(nspp
, nsplen
);
163 print_decnet_ctlmsg(register const union routehdr
*rhp
, u_int length
)
165 int mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
166 register union controlmsg
*cmp
= (union controlmsg
*)rhp
;
167 int src
, dst
, info
, blksize
, eco
, ueco
, hello
, other
, vers
;
168 etheraddr srcea
, rtea
;
170 char *rhpx
= (char *)rhp
;
172 switch (mflags
& RMF_CTLMASK
) {
174 (void)printf("init ");
175 src
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_src
);
176 info
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_info
);
177 blksize
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_blksize
);
178 vers
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_vers
);
179 eco
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_eco
);
180 ueco
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_ueco
);
181 hello
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_hello
);
184 "src %sblksize %d vers %d eco %d ueco %d hello %d",
185 dnaddr_string(src
), blksize
, vers
, eco
, ueco
,
189 (void)printf("verification ");
190 src
= EXTRACT_LE_16BITS(cmp
->cm_ver
.ve_src
);
191 other
= EXTRACT_LE_8BITS(cmp
->cm_ver
.ve_fcnval
);
192 (void)printf("src %s fcnval %o", dnaddr_string(src
), other
);
195 (void)printf("test ");
196 src
= EXTRACT_LE_16BITS(cmp
->cm_test
.te_src
);
197 other
= EXTRACT_LE_8BITS(cmp
->cm_test
.te_data
);
198 (void)printf("src %s data %o", dnaddr_string(src
), other
);
201 (void)printf("lev-1-routing ");
202 src
= EXTRACT_LE_16BITS(cmp
->cm_l1rou
.r1_src
);
203 (void)printf("src %s ", dnaddr_string(src
));
204 print_l1_routes(&(rhpx
[sizeof(struct l1rout
)]),
205 length
- sizeof(struct l1rout
));
208 (void)printf("lev-2-routing ");
209 src
= EXTRACT_LE_16BITS(cmp
->cm_l2rout
.r2_src
);
210 (void)printf("src %s ", dnaddr_string(src
));
211 print_l2_routes(&(rhpx
[sizeof(struct l2rout
)]),
212 length
- sizeof(struct l2rout
));
215 (void)printf("router-hello ");
216 vers
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_vers
);
217 eco
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_eco
);
218 ueco
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_ueco
);
219 memcpy((char *)&srcea
, (char *)&(cmp
->cm_rhello
.rh_src
),
221 src
= EXTRACT_LE_16BITS(srcea
.dne_remote
.dne_nodeaddr
);
222 info
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_info
);
223 blksize
= EXTRACT_LE_16BITS(cmp
->cm_rhello
.rh_blksize
);
224 priority
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_priority
);
225 hello
= EXTRACT_LE_16BITS(cmp
->cm_rhello
.rh_hello
);
228 "vers %d eco %d ueco %d src %s blksize %d pri %d hello %d",
229 vers
, eco
, ueco
, dnaddr_string(src
),
230 blksize
, priority
, hello
);
231 print_elist(&(rhpx
[sizeof(struct rhellomsg
)]),
232 length
- sizeof(struct rhellomsg
));
235 (void)printf("endnode-hello ");
236 vers
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_vers
);
237 eco
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_eco
);
238 ueco
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_ueco
);
239 memcpy((char *)&srcea
, (char *)&(cmp
->cm_ehello
.eh_src
),
241 src
= EXTRACT_LE_16BITS(srcea
.dne_remote
.dne_nodeaddr
);
242 info
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_info
);
243 blksize
= EXTRACT_LE_16BITS(cmp
->cm_ehello
.eh_blksize
);
245 memcpy((char *)&rtea
, (char *)&(cmp
->cm_ehello
.eh_router
),
247 dst
= EXTRACT_LE_16BITS(rtea
.dne_remote
.dne_nodeaddr
);
248 hello
= EXTRACT_LE_16BITS(cmp
->cm_ehello
.eh_hello
);
249 other
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_data
);
252 "vers %d eco %d ueco %d src %s blksize %d rtr %s hello %d data %o",
253 vers
, eco
, ueco
, dnaddr_string(src
),
254 blksize
, dnaddr_string(dst
), hello
, other
);
258 (void)printf("unknown control message");
259 default_print((u_char
*)rhp
, length
);
265 print_t_info(int info
)
267 int ntype
= info
& 3;
269 case 0: (void)printf("reserved-ntype? "); break;
270 case TI_L2ROUT
: (void)printf("l2rout "); break;
271 case TI_L1ROUT
: (void)printf("l1rout "); break;
272 case TI_ENDNODE
: (void)printf("endnode "); break;
275 (void)printf("verif ");
277 (void)printf("blo ");
281 print_l1_routes(const char *rp
, u_int len
)
287 /* The last short is a checksum */
288 while (len
> (3 * sizeof(short))) {
289 count
= EXTRACT_LE_16BITS(rp
);
291 return; /* seems to be bogus from here on */
293 len
-= sizeof(short);
294 id
= EXTRACT_LE_16BITS(rp
);
296 len
-= sizeof(short);
297 info
= EXTRACT_LE_16BITS(rp
);
299 len
-= sizeof(short);
300 (void)printf("{ids %d-%d cost %d hops %d} ", id
, id
+ count
,
301 RI_COST(info
), RI_HOPS(info
));
306 print_l2_routes(const char *rp
, u_int len
)
312 /* The last short is a checksum */
313 while (len
> (3 * sizeof(short))) {
314 count
= EXTRACT_LE_16BITS(rp
);
316 return; /* seems to be bogus from here on */
318 len
-= sizeof(short);
319 area
= EXTRACT_LE_16BITS(rp
);
321 len
-= sizeof(short);
322 info
= EXTRACT_LE_16BITS(rp
);
324 len
-= sizeof(short);
325 (void)printf("{areas %d-%d cost %d hops %d} ", area
, area
+ count
,
326 RI_COST(info
), RI_HOPS(info
));
331 print_i_info(int info
)
333 int ntype
= info
& II_TYPEMASK
;
335 case 0: (void)printf("reserved-ntype? "); break;
336 case II_L2ROUT
: (void)printf("l2rout "); break;
337 case II_L1ROUT
: (void)printf("l1rout "); break;
338 case II_ENDNODE
: (void)printf("endnode "); break;
341 (void)printf("verif ");
342 if (info
& II_NOMCAST
)
343 (void)printf("nomcast ");
345 (void)printf("blo ");
349 print_elist(const char *elp
, u_int len
)
351 /* Not enough examples available for me to debug this */
355 print_nsp(const u_char
*nspp
, u_int nsplen
)
357 const struct nsphdr
*nsphp
= (struct nsphdr
*)nspp
;
360 flags
= EXTRACT_LE_8BITS(nsphp
->nh_flags
);
361 dst
= EXTRACT_LE_16BITS(nsphp
->nh_dst
);
362 src
= EXTRACT_LE_16BITS(nsphp
->nh_src
);
364 switch (flags
& NSP_TYPEMASK
) {
366 switch (flags
& NSP_SUBMASK
) {
370 case MFS_BOM
+MFS_EOM
:
371 printf("data %d>%d ", src
, dst
);
373 struct seghdr
*shp
= (struct seghdr
*)nspp
;
378 u_int data_off
= sizeof(struct minseghdr
);
380 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
381 if (ack
& SGQ_ACK
) { /* acknum field */
382 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
383 (void)printf("nak %d ", ack
& SGQ_MASK
);
385 (void)printf("ack %d ", ack
& SGQ_MASK
);
386 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
387 data_off
+= sizeof(short);
388 if (ack
& SGQ_OACK
) { /* ackoth field */
389 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
390 (void)printf("onak %d ", ack
& SGQ_MASK
);
392 (void)printf("oack %d ", ack
& SGQ_MASK
);
393 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
394 data_off
+= sizeof(short);
397 (void)printf("seg %d ", ack
& SGQ_MASK
);
399 dp
= &(nspp
[data_off
]);
404 case MFS_ILS
+MFS_INT
:
407 struct seghdr
*shp
= (struct seghdr
*)nspp
;
412 u_int data_off
= sizeof(struct minseghdr
);
414 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
415 if (ack
& SGQ_ACK
) { /* acknum field */
416 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
417 (void)printf("nak %d ", ack
& SGQ_MASK
);
419 (void)printf("ack %d ", ack
& SGQ_MASK
);
420 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
421 data_off
+= sizeof(short);
422 if (ack
& SGQ_OACK
) { /* ackdat field */
423 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
424 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
426 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
427 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
428 data_off
+= sizeof(short);
431 (void)printf("seg %d ", ack
& SGQ_MASK
);
433 dp
= &(nspp
[data_off
]);
439 (void)printf("link-service %d>%d ", src
, dst
);
441 struct seghdr
*shp
= (struct seghdr
*)nspp
;
443 (struct lsmsg
*)&(nspp
[sizeof(struct seghdr
)]);
447 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
448 if (ack
& SGQ_ACK
) { /* acknum field */
449 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
450 (void)printf("nak %d ", ack
& SGQ_MASK
);
452 (void)printf("ack %d ", ack
& SGQ_MASK
);
453 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
454 if (ack
& SGQ_OACK
) { /* ackdat field */
455 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
456 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
458 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
459 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
462 (void)printf("seg %d ", ack
& SGQ_MASK
);
463 lsflags
= EXTRACT_LE_8BITS(lsmp
->ls_lsflags
);
464 fcval
= EXTRACT_LE_8BITS(lsmp
->ls_fcval
);
465 switch (lsflags
& LSI_MASK
) {
467 (void)printf("dat seg count %d ", fcval
);
468 switch (lsflags
& LSM_MASK
) {
472 (void)printf("donotsend-data ");
475 (void)printf("send-data ");
478 (void)printf("reserved-fcmod? %x", lsflags
);
483 (void)printf("intr req count %d ", fcval
);
486 (void)printf("reserved-fcval-int? %x", lsflags
);
492 (void)printf("reserved-subtype? %x %d > %d", flags
, src
, dst
);
497 switch (flags
& NSP_SUBMASK
) {
499 (void)printf("data-ack %d>%d ", src
, dst
);
501 struct ackmsg
*amp
= (struct ackmsg
*)nspp
;
504 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[0]);
505 if (ack
& SGQ_ACK
) { /* acknum field */
506 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
507 (void)printf("nak %d ", ack
& SGQ_MASK
);
509 (void)printf("ack %d ", ack
& SGQ_MASK
);
510 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[1]);
511 if (ack
& SGQ_OACK
) { /* ackoth field */
512 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
513 (void)printf("onak %d ", ack
& SGQ_MASK
);
515 (void)printf("oack %d ", ack
& SGQ_MASK
);
521 (void)printf("ils-ack %d>%d ", src
, dst
);
523 struct ackmsg
*amp
= (struct ackmsg
*)nspp
;
526 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[0]);
527 if (ack
& SGQ_ACK
) { /* acknum field */
528 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
529 (void)printf("nak %d ", ack
& SGQ_MASK
);
531 (void)printf("ack %d ", ack
& SGQ_MASK
);
532 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[1]);
533 if (ack
& SGQ_OACK
) { /* ackdat field */
534 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
535 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
537 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
543 (void)printf("conn-ack %d", dst
);
546 (void)printf("reserved-acktype? %x %d > %d", flags
, src
, dst
);
551 switch (flags
& NSP_SUBMASK
) {
554 if ((flags
& NSP_SUBMASK
) == MFS_CI
)
555 (void)printf("conn-initiate ");
557 (void)printf("retrans-conn-initiate ");
558 (void)printf("%d>%d ", src
, dst
);
560 struct cimsg
*cimp
= (struct cimsg
*)nspp
;
561 int services
, info
, segsize
;
566 services
= EXTRACT_LE_8BITS(cimp
->ci_services
);
567 info
= EXTRACT_LE_8BITS(cimp
->ci_info
);
568 segsize
= EXTRACT_LE_16BITS(cimp
->ci_segsize
);
570 switch (services
& COS_MASK
) {
574 (void)printf("seg ");
577 (void)printf("msg ");
580 (void)printf("crypt ");
583 switch (info
& COI_MASK
) {
585 (void)printf("ver 3.2 ");
588 (void)printf("ver 3.1 ");
591 (void)printf("ver 4.0 ");
594 (void)printf("ver 4.1 ");
597 (void)printf("segsize %d ", segsize
);
599 dp
= &(nspp
[sizeof(struct cimsg
)]);
600 pdata(dp
, nsplen
- sizeof(struct cimsg
));
605 (void)printf("conn-confirm %d>%d ", src
, dst
);
607 struct ccmsg
*ccmp
= (struct ccmsg
*)nspp
;
609 u_int segsize
, optlen
;
614 services
= EXTRACT_LE_8BITS(ccmp
->cc_services
);
615 info
= EXTRACT_LE_8BITS(ccmp
->cc_info
);
616 segsize
= EXTRACT_LE_16BITS(ccmp
->cc_segsize
);
617 optlen
= EXTRACT_LE_8BITS(ccmp
->cc_optlen
);
619 switch (services
& COS_MASK
) {
623 (void)printf("seg ");
626 (void)printf("msg ");
629 (void)printf("crypt ");
632 switch (info
& COI_MASK
) {
634 (void)printf("ver 3.2 ");
637 (void)printf("ver 3.1 ");
640 (void)printf("ver 4.0 ");
643 (void)printf("ver 4.1 ");
646 (void)printf("segsize %d ", segsize
);
648 (void)printf("optlen %d ", optlen
);
650 optlen
= min(optlen
, nsplen
- sizeof(struct ccmsg
));
651 dp
= &(nspp
[sizeof(struct ccmsg
)]);
658 (void)printf("disconn-initiate %d>%d ", src
, dst
);
660 struct dimsg
*dimp
= (struct dimsg
*)nspp
;
667 reason
= EXTRACT_LE_16BITS(dimp
->di_reason
);
668 optlen
= EXTRACT_LE_8BITS(dimp
->di_optlen
);
670 print_reason(reason
);
672 (void)printf("optlen %d ", optlen
);
674 optlen
= min(optlen
, nsplen
- sizeof(struct dimsg
));
675 dp
= &(nspp
[sizeof(struct dimsg
)]);
682 (void)printf("disconn-confirm %d>%d ", src
, dst
);
684 struct dcmsg
*dcmp
= (struct dcmsg
*)nspp
;
687 reason
= EXTRACT_LE_16BITS(dcmp
->dc_reason
);
689 print_reason(reason
);
693 (void)printf("reserved-ctltype? %x %d > %d", flags
, src
, dst
);
698 (void)printf("reserved-type? %x %d > %d", flags
, src
, dst
);
703 static struct tok reason2str
[] = {
704 { UC_OBJREJECT
, "object rejected connect" },
705 { UC_RESOURCES
, "insufficient resources" },
706 { UC_NOSUCHNODE
, "unrecognized node name" },
707 { DI_SHUT
, "node is shutting down" },
708 { UC_NOSUCHOBJ
, "unrecognized object" },
709 { UC_INVOBJFORMAT
, "invalid object name format" },
710 { UC_OBJTOOBUSY
, "object too busy" },
711 { DI_PROTOCOL
, "protocol error discovered" },
712 { DI_TPA
, "third party abort" },
713 { UC_USERABORT
, "user abort" },
714 { UC_INVNODEFORMAT
, "invalid node name format" },
715 { UC_LOCALSHUT
, "local node shutting down" },
716 { DI_LOCALRESRC
, "insufficient local resources" },
717 { DI_REMUSERRESRC
, "insufficient remote user resources" },
718 { UC_ACCESSREJECT
, "invalid access control information" },
719 { DI_BADACCNT
, "bad ACCOUNT information" },
720 { UC_NORESPONSE
, "no response from object" },
721 { UC_UNREACHABLE
, "node unreachable" },
722 { DC_NOLINK
, "no link terminate" },
723 { DC_COMPLETE
, "disconnect complete" },
724 { DI_BADIMAGE
, "bad image data in connect" },
725 { DI_SERVMISMATCH
, "cryptographic service mismatch" },
730 print_reason(register int reason
)
732 printf("%s ", tok2str(reason2str
, "reason-%d", reason
));
736 dnnum_string(u_short dnaddr
)
739 int area
= (u_short
)(dnaddr
& AREAMASK
) >> AREASHIFT
;
740 int node
= dnaddr
& NODEMASK
;
742 str
= (char *)malloc(sizeof("00.0000"));
744 error("dnnum_string: malloc");
745 sprintf(str
, "%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);