File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -507,6 +507,34 @@ etheraddr_string(register const u_char *ep)
507
507
return (tp -> e_name );
508
508
}
509
509
510
+ const char *
511
+ le64addr_string (const u_char * ep )
512
+ {
513
+ const unsigned int len = 8 ;
514
+ register u_int i ;
515
+ register char * cp ;
516
+ register struct enamemem * tp ;
517
+ char buf [BUFSIZE ];
518
+
519
+ tp = lookup_bytestring (ep , len );
520
+ if (tp -> e_name )
521
+ return (tp -> e_name );
522
+
523
+ cp = buf ;
524
+ for (i = len ; i > 0 ; -- i ) {
525
+ * cp ++ = hex [* (ep + i - 1 ) >> 4 ];
526
+ * cp ++ = hex [* (ep + i - 1 ) & 0xf ];
527
+ * cp ++ = ':' ;
528
+ }
529
+ cp -- ;
530
+
531
+ * cp = '\0' ;
532
+
533
+ tp -> e_name = strdup (buf );
534
+
535
+ return (tp -> e_name );
536
+ }
537
+
510
538
const char *
511
539
linkaddr_string (const u_char * ep , const unsigned int type , const unsigned int len )
512
540
{
Original file line number Diff line number Diff line change 34
34
35
35
extern const char * linkaddr_string (const u_char * , const unsigned int , const unsigned int );
36
36
extern const char * etheraddr_string (const u_char * );
37
+ extern const char * le64addr_string (const u_char * );
37
38
extern const char * etherproto_string (u_short );
38
39
extern const char * tcpport_string (u_short );
39
40
extern const char * udpport_string (u_short );
You can’t perform that action at this time.
0 commit comments