Lines 100-108
Link Here
|
100 |
register const struct atShortDDP *sdp; |
100 |
register const struct atShortDDP *sdp; |
101 |
u_short snet; |
101 |
u_short snet; |
102 |
|
102 |
|
|
|
103 |
#if 0 |
103 |
lp = (struct LAP *)bp; |
104 |
lp = (struct LAP *)bp; |
104 |
bp += sizeof(*lp); |
105 |
bp += sizeof(*lp); |
105 |
length -= sizeof(*lp); |
106 |
length -= sizeof(*lp); |
|
|
107 |
#else |
108 |
{ |
109 |
static struct LAP lp_ = {0, 0, lapDDP}; |
110 |
lp = &lp_; |
111 |
} |
112 |
#endif |
106 |
switch (lp->type) { |
113 |
switch (lp->type) { |
107 |
|
114 |
|
108 |
case lapShortDDP: |
115 |
case lapShortDDP: |
Lines 532-538
Link Here
|
532 |
if (tp2->addr == i) { |
539 |
if (tp2->addr == i) { |
533 |
tp->addr = (atnet << 8) | athost; |
540 |
tp->addr = (atnet << 8) | athost; |
534 |
tp->nxt = (struct hnamemem *)calloc(1, sizeof(*tp)); |
541 |
tp->nxt = (struct hnamemem *)calloc(1, sizeof(*tp)); |
535 |
(void)sprintf(nambuf, "%s.%d", tp2->name, athost); |
542 |
(void)sprintf(nambuf, "%s.%02x", tp2->name, athost); |
536 |
tp->name = savestr(nambuf); |
543 |
tp->name = savestr(nambuf); |
537 |
return (tp->name); |
544 |
return (tp->name); |
538 |
} |
545 |
} |
Lines 540-549
Link Here
|
540 |
tp->addr = (atnet << 8) | athost; |
547 |
tp->addr = (atnet << 8) | athost; |
541 |
tp->nxt = (struct hnamemem *)calloc(1, sizeof(*tp)); |
548 |
tp->nxt = (struct hnamemem *)calloc(1, sizeof(*tp)); |
542 |
if (athost != 255) |
549 |
if (athost != 255) |
543 |
(void)sprintf(nambuf, "%d.%d.%d", |
550 |
(void)sprintf(nambuf, "%02x.%02x.%02x", |
544 |
atnet >> 8, atnet & 0xff, athost); |
551 |
atnet >> 8, atnet & 0xff, athost); |
545 |
else |
552 |
else |
546 |
(void)sprintf(nambuf, "%d.%d", atnet >> 8, atnet & 0xff); |
553 |
(void)sprintf(nambuf, "%02x.%02x", atnet >> 8, atnet & 0xff); |
547 |
i = strlen(nambuf) + 1; |
554 |
i = strlen(nambuf) + 1; |
548 |
tp->name = strcpy(malloc((u_int) i), nambuf); |
555 |
tp->name = strcpy(malloc((u_int) i), nambuf); |
549 |
|
556 |
|
Lines 564-571
Link Here
|
564 |
static char buf[8]; |
571 |
static char buf[8]; |
565 |
|
572 |
|
566 |
if (nflag) { |
573 |
if (nflag) { |
567 |
(void)sprintf(buf, "%d", skt); |
574 |
(void)sprintf(buf, "%02x", skt); |
568 |
return (buf); |
575 |
return (buf); |
569 |
} |
576 |
} |
570 |
return (tok2str(skt2str, "%d", skt)); |
577 |
return (tok2str(skt2str, "%02x", skt)); |
571 |
} |
578 |
} |