Lines Matching refs:hpkt

90 static void display_cipher(HPKT &hpkt)  in display_cipher()  argument
94 if (*(int32_t *)(hpkt.ritem->value) == ciphertypes[i].type_value) { in display_cipher()
95 hpkt.sendit(hpkt, "\n \"%s\": \"%s\"", hpkt.ritem->name, in display_cipher()
102 static void display_digest(HPKT &hpkt) in display_digest() argument
106 if (*(int32_t *)(hpkt.ritem->value) == digesttypes[i].type_value) { in display_digest()
107 hpkt.sendit(hpkt, "\n \"%s\": \"%s\"", hpkt.ritem->name, in display_digest()
280 static void display_runres(HPKT &hpkt) in display_runres() argument
283 RUNRES **prun = (RUNRES **)hpkt.ritem->value; in display_runres()
288 hpkt.sendit(hpkt, "\n \"%s\": [\n", hpkt.ritem->name); in display_runres()
290 if (!first_run) hpkt.sendit(hpkt, ",\n"); in display_runres()
293 hpkt.sendit(hpkt, " {\n"); in display_runres()
299 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
300 hpkt.sendit(hpkt, " \"%s\": %lld", ConnectFields[i].name, in display_runres()
311 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
312 hpkt.sendit(hpkt, " \"Hour\":"); in display_runres()
313 display_bit_array(hpkt, run->hour, 24); in display_runres()
314 hpkt.sendit(hpkt, ",\n \"Minute\": %d", run->minute); in display_runres()
319 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
320 hpkt.sendit(hpkt, " \"Day\":"); in display_runres()
321 display_bit_array(hpkt, run->mday, 31); in display_runres()
325 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
326 hpkt.sendit(hpkt, " \"LastDay\": 1"); in display_runres()
330 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
331 hpkt.sendit(hpkt, " \"Month\":"); in display_runres()
332 display_bit_array(hpkt, run->month, 12); in display_runres()
336 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
337 hpkt.sendit(hpkt, " \"DayOfWeek\":"); in display_runres()
338 display_bit_array(hpkt, run->wday, 7); in display_runres()
342 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
343 hpkt.sendit(hpkt, " \"WeekOfMonth\":"); in display_runres()
344 display_bit_array(hpkt, run->wom, 6); in display_runres()
348 if (!first) hpkt.sendit(hpkt, ",\n"); in display_runres()
349 hpkt.sendit(hpkt, " \"WeekOfYear\":"); in display_runres()
350 display_bit_array(hpkt, run->woy, 54); in display_runres()
353 hpkt.sendit(hpkt, "\n }"); in display_runres()
356 hpkt.sendit(hpkt, "\n ]"); in display_runres()
371 HPKT hpkt; in dump_json() local
374 init_hpkt(hpkt); in dump_json()
379 hpkt.sendit(hpkt, "["); in dump_json()
386 hpkt.sendit(hpkt, "{"); in dump_json()
390 hpkt.sendit(hpkt, "["); in dump_json()
411 hpkt.res = res; in dump_json()
449 hpkt.sendit(hpkt, " {"); in dump_json()
461 hpkt.sendit(hpkt, "%s: {\n", quote_string(hpkt.edbuf2, *items[item].value)); in dump_json()
467 hpkt.sendit(hpkt, "{\n \"%s\": {", resources[resinx].name); in dump_json()
495 hpkt.ritem = &items[item]; in dump_json()
499 int ret = display_global_item(hpkt); in dump_json()
507 display_cipher(hpkt); in dump_json()
509 display_digest(hpkt); in dump_json()
511 display_collector_types(hpkt); in dump_json()
513 display_runres(hpkt); in dump_json()
546 display_last(hpkt); /* If last bit set always call to cleanup */ in dump_json()
552 hpkt.sendit(hpkt, "\n }"); /* Finish the Resource with a single } */ in dump_json()
558 hpkt.sendit(hpkt, "\n }\n}"); /* end of resource */ in dump_json()
560 hpkt.sendit(hpkt, "}\n}"); in dump_json()
568 hpkt.sendit(hpkt, "\n]\n"); in dump_json()
572 hpkt.sendit(hpkt, "\n}\n"); in dump_json()
575 hpkt.sendit(hpkt, "\n]\n"); in dump_json()
577 term_hpkt(hpkt); in dump_json()