4 * refnumtoa - return asciized refclock addresses stored in local array space
9 #include "lib_strbuf.h"
10 #include "ntp_stdlib.h"
14 struct sockaddr_storage
* num
17 register u_int32 netnum
;
19 register const char *rclock
;
23 if(num
->ss_family
== AF_INET
) {
24 netnum
= ntohl(((struct sockaddr_in
*)num
)->sin_addr
.s_addr
);
25 rclock
= clockname((int)((u_long
)netnum
>> 8) & 0xff);
28 (void)sprintf(buf
, "%s(%lu)", rclock
, (u_long
)netnum
& 0xff);
30 (void)sprintf(buf
, "REFCLK(%lu,%lu)",
31 ((u_long
)netnum
>> 8) & 0xff, (u_long
)netnum
& 0xff);
35 (void)sprintf(buf
, "refclock address type not implemented yet, use IPv4 refclock address.");