Deleted Added
full compact
remote.c (249141) remote.c (255579)
1/*
2 * daemon/remote.c - remote control for the unbound daemon.
3 *
4 * Copyright (c) 2008, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 634 unchanged lines hidden (view full) ---

643 char nm[16];
644 snprintf(nm, sizeof(nm), "thread%d", i);
645 nm[sizeof(nm)-1]=0;
646 return print_stats(ssl, nm, s);
647}
648
649/** print long number */
650static int
1/*
2 * daemon/remote.c - remote control for the unbound daemon.
3 *
4 * Copyright (c) 2008, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 634 unchanged lines hidden (view full) ---

643 char nm[16];
644 snprintf(nm, sizeof(nm), "thread%d", i);
645 nm[sizeof(nm)-1]=0;
646 return print_stats(ssl, nm, s);
647}
648
649/** print long number */
650static int
651print_longnum(SSL* ssl, char* desc, size_t x)
651print_longnum(SSL* ssl, const char* desc, size_t x)
652{
653 if(x > 1024*1024*1024) {
654 /* more than a Gb */
655 size_t front = x / (size_t)1000000;
656 size_t back = x % (size_t)1000000;
657 return ssl_printf(ssl, "%s%u%6.6u\n", desc,
658 (unsigned)front, (unsigned)back);
659 } else {

--- 715 unchanged lines hidden (view full) ---

1375 do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_NAPTR, LDNS_RR_CLASS_IN);
1376
1377 free(nm);
1378 send_ok(ssl);
1379}
1380
1381/** printout a delegation point info */
1382static int
652{
653 if(x > 1024*1024*1024) {
654 /* more than a Gb */
655 size_t front = x / (size_t)1000000;
656 size_t back = x % (size_t)1000000;
657 return ssl_printf(ssl, "%s%u%6.6u\n", desc,
658 (unsigned)front, (unsigned)back);
659 } else {

--- 715 unchanged lines hidden (view full) ---

1375 do_cache_remove(w, nm, nmlen, LDNS_RR_TYPE_NAPTR, LDNS_RR_CLASS_IN);
1376
1377 free(nm);
1378 send_ok(ssl);
1379}
1380
1381/** printout a delegation point info */
1382static int
1383ssl_print_name_dp(SSL* ssl, char* str, uint8_t* nm, uint16_t dclass,
1383ssl_print_name_dp(SSL* ssl, const char* str, uint8_t* nm, uint16_t dclass,
1384 struct delegpt* dp)
1385{
1386 char buf[257];
1387 struct delegpt_ns* ns;
1388 struct delegpt_addr* a;
1389 int f = 0;
1390 if(str) { /* print header for forward, stub */
1391 char* c = ldns_rr_class2str(dclass);

--- 856 unchanged lines hidden ---
1384 struct delegpt* dp)
1385{
1386 char buf[257];
1387 struct delegpt_ns* ns;
1388 struct delegpt_addr* a;
1389 int f = 0;
1390 if(str) { /* print header for forward, stub */
1391 char* c = ldns_rr_class2str(dclass);

--- 856 unchanged lines hidden ---