+++ /dev/null
-PCAT README
-
-PCAT -- cat pcap streams
-
-1. Introduction
-Pcat consists out of three programs:
- 1. pcat
- This program reads a raw pcap stream, extract the payload of
- each packet and sends the payload to a nameserver of the users'
- choice.
- Each payload and reply from the server is printed to standard
- output as ASCII. The binary packet/payload contents is printed
- as hexadecimal in network order.
-
- 2. pcat-diff
- This utility reads two streams/files as generated by 'pcat' it
- then compare these and prints the differences to standard
- output.
-
- The output format is simular to that of 'pcat'.
-
- 3. pcat-print
- This program reads the 'diff' as printed by 'pcat-diff' and
- tries to re-generate to original DNS packets. If this succeeds
- the packet is printed to standard output. If it fails an error
- is printed instead.
-
-2. Usage
-All pcat utils are created as filters, thus they will read from a file
-or standard input. All output is send to standard output.
-
-Send a steam to a nameserver:
- ./pcat -a 213.154.224.1 20011009-134418-q50000.pkt > reply.53
-
-Send the stream to another nameserver:
- ./pcat -a 213.154.224.1 -p 5454 20011009-134418-q50000.pkt > reply.5454
-
-The two pcat-stream, 'reply.53' and 'reply.5454' can now be diffed with
-pcat-diff:
- ./pcat-diff reply.53 reply.54 > reply.diff
-
-If we to see what actual packets that differ (if they can be parsed) we
-can use pcap-print:
- pcap-print reply.diff
-
-Or it can all be done with pipes, eliminating the need of files.
-./pcat-diff <(./pcat -a 213.154.224.1 20011009-134418-q50000.pkt) \
-<(./pcat 213.154.224.1 -p 5454 20011009-134418-q50000.pkt) | ./pcat-print
bool
ldns_zone_push_rr(ldns_zone *z, ldns_rr *rr)
{
- return ldns_rr_list_push_rr(
- ldns_zone_rrs(z), rr);
+ return ldns_rr_list_push_rr( ldns_zone_rrs(z), rr);
}
/* this will be an EXPENSIVE op with our zone structure */
dname_a = ldns_rr_owner(a);
if (ldns_dname_is_subdomain(dname_a, ns_owner) &&
- ldns_rdf_compare(dname_ns, dname_a) == 0
- ) {
+ ldns_rdf_compare(dname_ns, dname_a) == 0) {
/* GLUE! */
ldns_rr_list_push_rr(glue, a);
break;
}
ldns_zone *
-ldns_zone_new_frm_fp_l(FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c, int *line_nr)
+ldns_zone_new_frm_fp_l(FILE *fp, ldns_rdf *origin, uint16_t ttl, ldns_rr_class c,
+ int *line_nr)
{
ldns_zone *newzone;
ldns_rr *rr;
#endif
void
-ldns_zone_free(ldns_zone *zone) {
+ldns_zone_free(ldns_zone *zone)
+{
ldns_rr_list_free(zone->_rrs);
LDNS_FREE(zone);
}
void
-ldns_zone_deep_free(ldns_zone *zone) {
+ldns_zone_deep_free(ldns_zone *zone)
+{
ldns_rr_free(zone->_soa);
ldns_rr_list_deep_free(zone->_rrs);
LDNS_FREE(zone);