A49.cc:		in_addr_t b = a50->Anonymize(IPAddr(addr, NO_SCANNER));
A49.cc:		DebugMsg("A49 preprocess: %s -> %s", 
A49.cc:		(prefix & prefix_mask) | (a50->Anonymize(addr) & ~prefix_mask);
A49.cc:		throw Exception("trying to settle zero-length prefix: %s",
A49.cc:	// Next try a pseudo-random prefix that is hashed from prefix
A49.cc:	// Finally we will just try all non-zero prefixes one-by-one.
A49.cc:	in_addr_t prefix_inc = 1 << (32 - prefix.len());
A49.cc:	a50->sanity_check();
A49.cc:		Note("A49 network: %s -> %s",
A49.cc:		       "topology: prefix-independent network", 
A50.cc:// provided with non-indecreasing length.
A50.cc:	n->output = (input & prefix_mask) | (n->output & suffix_mask);
A50.cc:	if ( n->child[0] && n->child[1] )
A50.cc:			bi_ffs(n->child[0]->input ^ n->child[1]->input);
A50.cc:			bi_ffs(n->child[0]->output ^ n->child[1]->output);
A50.cc:		// Rule 2: there's a first-born child that has
A50.cc:		int first_born = -1;
A50.cc:		if ( n->input == n->child[0]->input )
A50.cc:		else if ( n->input == n->child[1]->input )
A50.cc:			internal_error("no first-born child");
A50.cc:		if ( n->output != n->child[first_born]->output )
A50.cc:		sanity_check(n->child[0]);
A50.cc:		sanity_check(n->child[1]);
A50.cc:		if ( n->child[0] || n->child[1] )
A50.cc:	return find_node(a.addr())->output;
A50.cc:	for ( int i = 1; i < block_size - 1; ++i )
A50.cc:	block[block_size - 1].child[0] = 0;
A50.cc:		next_free_node = n->child[0];
A50.cc:	n->child[0] = next_free_node;
A50.cc:	// Generate the pseudo-random bits for the last (32 - swivel) bits.
A50.cc:	// performance of prefix-preserving IP traffic trace anonymization"
A50.cc:		in_addr_t bit_mask = 1 << (31-i);
A50.cc:		output = output | ((flip << (31-i)) ^ (a & bit_mask));
A50.cc:	// -A50 anonymization
A50.cc:		((peer_output >> (32 - swivel)) ^ 1) << (32 - swivel);
A50.cc:	// swivel is first bit 'a' and 'old->input' differ.
A50.cc:	int swivel = bi_ffs(a ^ n->input);
A50.cc:	int bitvalue = (a >> (32 - swivel)) & 1;
A50.cc:	down[bitvalue]->input = a;
A50.cc:	down[bitvalue]->output = make_output(a, swivel, n->output);
A50.cc:	down[bitvalue]->child[0] = down[bitvalue]->child[1] = 0;
A50.cc:	*down[1 - bitvalue] = *n;	// copy orig node down one level
A50.cc:	Does not seem to be necessary. -RP
A50.cc:	n->input = down[1]->input;	// NB: 1s to the right (0s to the left)
A50.cc:	n->output = down[1]->output;
A50.cc:	n->child[0] = down[0];		// point to children
A50.cc:	n->child[1] = down[1];
A50.cc:		root->input = a;
A50.cc:		root->output = hash_a50(a, 0);
A50.cc:		root->child[0] = root->child[1] = 0;
A50.cc:		if ( n->input == a )
A50.cc:		if ( ! n->child[0] )
A50.cc:				bi_ffs(n->child[0]->input ^ n->child[1]->input);
A50.cc:			if ( bi_ffs(a ^ n->input) < swivel )
A50.cc:			else if ( a & (1 << (32 - swivel)) )
A50.cc:				n = n->child[1];
A50.cc:				n = n->child[0];
AEnt.cc:	// Prefixes that are not prefix-preserving with neightboring prefixes
AEnt.cc:	// (prefix-preserving) algorithm. They are either preserved or randomly
AEnt.cc:		// We treat private addresses similarly as class D addresses --
AEnt.cc:		topology->enterprise_networks();
AEnt.cc:		const vector<Prefix> net_prefixes = net->prefixes();
AEnt.cc:			new ASubnetGroup(key, net->name(), net_prefixes);
AEnt.cc:			new ASubnetGroup(key, net->name(), net_prefixes);
AEnt.cc:			asubnetgroup_scan->add_subnet(p);
AEnt.cc:		const vector<EnterpriseSubnet *> &subnets = net->subnets();
AEnt.cc:			                net->name().c_str());
AEnt.cc:			const Prefix &subnet_prefix = subnet->prefix();
AEnt.cc:			if ( subnet->break_up() )
AEnt.cc:					asubnetgroup->add_subnet(Prefix(x, 32));
AEnt.cc:				asubnetgroup->add_subnet(subnet_prefix);
AEnt.cc:		asubnetgroup->finalize();
AEnt.cc:		asubnetgroup_scan->finalize();
AEnt.cc:	// Init the A49 prefix-preserving anonymizer
AEnt.cc:	a49->Preprocess(addr);
AEnt.cc:			x = IPAddr(pv.val->Anonymize(x), x.scanner());
AEnt.cc:			x = IPAddr(pv.val->Anonymize(x), x.scanner());
AEnt.cc:	in_addr_t a49_output = a49->Anonymize(x);
AEnt.cc:		topology->enterprise_networks();
AEnt.cc:		const vector<Prefix> net_prefixes = net->prefixes();
AEnt.cc:				a49->Anonymize(IPAddr(prefix.addr(), NO_SCANNER)),
AEnt.cc:			       net->name().c_str());
AEnt.cc:		const vector<EnterpriseSubnet *> &subnets = net->subnets();
AEnt.cc:			if ( ! subnet->break_up() )
AEnt.cc:				const Prefix &prefix = subnet->prefix();
AEnt.cc:		asubnet_by_prefix_anon[prefix_anon]->GenerateNotes();
AEnt.cc:	a49->GenerateNotes();
ARP.cc:	pkt_in->PushNetHeader(offset_in);
ARP.cc:	pkt_out->PushNetHeader(offset_out);
ARP.cc:	pkt_in->PopNetHeader();
ARP.cc:	pkt_out->PopNetHeader();
ASubnet.cc:          prefix(arg_subnet->prefix()) 
ASubnet.cc:	if ( flags & PRESERVE_GATEWAY && prefix.includes(subnet->gateway()) )
ASubnet.cc:		suffix_to_preserve.insert(subnet->gateway() & suffix_mask);
ASubnet.cc:		const vector<in_addr_t> &b = subnet->broadcast();
ASubnet.cc:			32 - prefix.len(), suffix);
ASubnet.cc:	in_addr_t subnet_anon = aent->Anonymize(IPAddr(prefix.addr(), NO_SCANNER));
ASubnet.cc:	in_addr_t gateway = subnet->gateway();
ASubnet.cc:			aent->Anonymize(IPAddr(gateway, NO_SCANNER)); 
ASubnet.cc:		       "%s -> %s", 
ASubnet.cc:	for ( vector<in_addr_t>::const_iterator it = subnet->broadcast().begin(); 
ASubnet.cc:			it != subnet->broadcast().end(); ++it )
ASubnet.cc:			aent->Anonymize(IPAddr(*it, NO_SCANNER));
ASubnet.cc:		       "%s -> %s", 
ASubnet.cc:		Note("subnet %s -> %s",
DataProcessor.cc:#include "DataProcessor-inl.h"
EtherAddr.cc:		output = it->second;
EtherAddr.cc:	Note("%.6f %s: MAC address mapping: %s -> %s",
EtherAddr.cc:	amac->anonymize(input, output);
EtherAddr.cc:	pkt_out->dump(output.mac, len, offset_out);
Ethernet.cc:	pkt_in->SetLinkHeader(offset_in);
Ethernet.cc:	pkt_out->SetLinkHeader(offset_out);
Ethernet.cc:	pkt_in->SetLinkType(LINKTYPE_ETHERNET);
Ethernet.cc:	pkt_in->SetLinkType(LINKTYPE_ETHERNET);
Ethernet.cc:		Alert("non-IP packet %d", pkt_in->NetworkType());
Ethernet.cc:		len = caplen - offset_in;
Ethernet.cc:	switch ( pkt_in->NetworkType() )
Ethernet.cc:#		include "policy/ether-data.anon"
ICMP.cc:	const struct icmp *icmphdr = pkt->ICMPHeader();
ICMP.cc:		if ( ! pkt->is_embedded_pkt() )
ICMP.cc:	return 0xffff - ones_complement_checksum(
ICMP.cc:		pkt->TransportLen());
ICMP.cc:	if ( pkt_in->is_fragmented() )
ICMP.cc:	else if ( pkt_in->TransportLen() == pkt_in->IPPayloadLen() )
ICMP.cc:				pkt_in->ICMPChkSum(), input_checksum);
ICMP.cc:			       pkt_in->is_embedded_pkt() ? "(embedded) " : "");
ICMP.cc:	if ( pkt_in->ICMPChkSum() == 0xffff )
ICMP.cc:	pkt_out->dump((const u_char *) &new_chksum, 2, offset_out);
ICMP.cc:#	include "policy/icmp-echo.anon"
ICMP.cc:#	include "policy/icmp-tstamp.anon"
ICMP.cc:#	include "policy/icmp-ireq.anon"
ICMP.cc:#	include "policy/icmp-maskreq.anon"
ICMP.cc:#	include "policy/icmp-context.anon"
ICMP.cc:#	include "policy/icmp-redirect.anon"
ICMP.cc:#	include "policy/icmp-paramprob.anon"
ICMP.cc:#	include "policy/icmp-routersolicit.anon"
ICMP.cc:		pkt_in->FlowID().c_str(), pkt_in->ICMPType());
ICMP.cc:	switch ( pkt_in->ICMPType() )
ICMP.cc:#		include "policy/icmp-data.anon"
IP.cc:	if ( ! pkt->IPHeader() )
IP.cc:	return 0xffff - ones_complement_checksum(
IP.cc:		(const void *) pkt->IPHeader(), 
IP.cc:		pkt->IPHdrLen());
IP.cc:	if ( ! pkt_in->IPHeader() )
IP.cc:			pkt_in->is_embedded_pkt() ? "(embedded) " : "");
IP.cc:			pkt_in->IPChkSum(), input_checksum);
IP.cc:	if ( pkt_in->IPChkSum() == 0xffff )
IP.cc:	pkt_out->dump((const u_char *) &new_chksum, 2, offset_out);
IP.cc:	pkt_in->PushNetHeader(offset_in);
IP.cc:	pkt_out->PushNetHeader(offset_out);
IP.cc:	pkt_in->PopNetHeader();
IP.cc:	pkt_out->PopNetHeader();
IP.cc:		                  offset_in, pkt_in->IPOptionLen(), caplen);
IP.cc:#			include "policy/ip-option.anon"
IP.cc:	len = pkt_in->IPPayloadLen();
IP.cc:		pkt_in->CheckTruncation(data_name, 
IP.cc:		len = caplen - offset_in;
IP.cc:	if ( pkt_in->IPFragOffset() > 0 )
IP.cc:#		include "policy/ip-frag.anon"
IP.cc:	pkt_in->PushTransportHeader(offset_in);
IP.cc:	pkt_out->PushTransportHeader(offset_out);
IP.cc:	switch ( pkt_in->IPProto() )
IP.cc:#		include "policy/ip-data.anon"
IP.cc:	pkt_in->PopTransportHeader();
IP.cc:	pkt_out->PopTransportHeader();
IP.cc:	len = opt_end - offset_in;
IP.cc:		len = caplen - offset_in;
IP.cc:	pkt_out->dump(IPOPT_NOP, len, offset_out);
IPAddr.cc:		base->Preprocess(addr);
IPAddr.cc:			return it->second;
IPAddr.cc:		in_addr_t a = base->Anonymize(addr);
IPAddr.cc:		Note("IP address mapping (%s %.6f) %s (%s) -> %s", 
IPAddr.cc:		base->GenerateNotes();
IPAddr.cc:	ip_anonymizer->GenerateNotes();
IPAddr.cc:	ip_anonymizer->Preprocess(addr);
IPAddr.cc:	return ip_anonymizer->Anonymize(input);
IPAddr.cc:		if ( ! pkt_in->truncated() )
IPAddr.cc:			len = caplen - offset_in;
IPAddr.cc:			pkt_in->set_scan();
IPAddr.cc:		addr = ip_anonymizer->Anonymize(ip_addr);
IPAddr.cc:		pkt_out->dump((const u_char *) &addr, 4, offset_out);
IPAddr.cc:		if ( ! pkt_in->truncated() )
IPAddr.cc:			len = caplen - offset_in;
IPAddr.cc:	pkt_in->RegisterIPAddr(data_name, addr);
LLC.cc:		Alert("non-IP packet %d", pkt_in->NetworkType());
LLC.cc:		len = caplen - offset_in;
LLC.cc:	switch ( pkt_in->NetworkType() )
LLC.cc:#		include "policy/llc-data.anon"
Main.cc:	fprintf(stderr, "Usage: %s [-DSTW] [-f <pcap filter>] [-k <key>] [-K] [-w <output file>] [-s <output scanner file>] <input files...>\n", exe);
Main.cc:	fprintf(stderr, "-D\n");
Main.cc:	fprintf(stderr, "-S\n");
Main.cc:	fprintf(stderr, "-W\n");
Main.cc:	fprintf(stderr, "File-by-file output mode. Each output file name is the input file name plus \".anon\" for regular packets, and \".anon-scanners\" for packets involving scanners.\n\n");
Main.cc:	fprintf(stderr, "-T\n");
Main.cc:	fprintf(stderr, "-f <pcap filter>\n");
Main.cc:	fprintf(stderr, "-k [<key file>:]<key digest>\n");
Main.cc:	fprintf(stderr, "Use <key file> (by default \".tcpmkpub-key\") as input to generate the anonymization key. The md5 digest of the key file must match the key digest to insure that the key file is not stealthily substituted. The key digest (given in the output of tcpmkpub_keygen) is a 32-byte long string representing the 128-bit digest in hexadecimal digits (as in the output of command 'md5').\n");
Main.cc:	fprintf(stderr, "-k 64eff15984a7ab2c4f710843ff010346\n");
Main.cc:	fprintf(stderr, "-k mykey:64eff15984a7ab2c4f710843ff010346\n\n");
Main.cc:	fprintf(stderr, "-K\n");
Main.cc:	fprintf(stderr, "-Generate a key and write to .tcpmkpub-key");
Main.cc:	fprintf(stderr, "-w <file>\n");
Main.cc:	fprintf(stderr, "-s <file>\n");
Main.cc:	fprintf(stderr, "Write the output trace involving scanners to <file>. If '-s' is specified, the regular output trace (-w) will not include packets involving scanners.\n\n");
Main.cc:#include "local-policy/filter.anon"
Main.cc:	while ( (ch = getopt(argc, argv, "DSTWf:k:s:w:")) != -1 )
Main.cc:	argc -= optind;
Main.cc:			"Error: a key must be specified with '-k'\n");
Main.cc:			"(with -S)\n");
Main.cc:		     "Error: cannot enable file-by-file output mode (-W) "
Main.cc:		     "and specify output file (-w %s) at the same time", 
Main.cc:		regular_dump_filename = "-";
Packet.cc:	ll_hdr_offset = net_hdr_offset = transport_hdr_offset = -1;
Packet.cc:	net_hdr_offset_stack.push_back(-1);
Packet.cc:	transport_hdr_offset_stack.push_back(-1);
Packet.cc:	// do not set the top most one to -1
Packet.cc:		       net_hdr_offset_stack[1] : -1;
Packet.cc:				return eth_hdr ? ntohs(eth_hdr->ether_type) : -1;
Packet.cc:				return llc_hdr ? ntohs(llc_hdr->type) : -1;
Packet.cc:	return wifi_hdr ? ((wifi_hdr->fc) >> 2) & 0x3 : -1;
Packet.cc:	return ip_hdr ? ip_hdr->ip_p : -1;
Packet.cc:	return ip_hdr ? (int) (ip_hdr->ip_sum) : -1;
Packet.cc:	return ip_hdr ? (int) (ntohs(ip_hdr->ip_off) & 0x1fff) : -1;
Packet.cc:	return (ip_hdr && (ntohs(ip_hdr->ip_off) & 0x3fff)); 
Packet.cc:	return ip_hdr ? (int) (ip_hdr->ip_hl * 4) : -1;
Packet.cc:	return ip_hdr ? (int) (IPHdrLen() - sizeof(*ip_hdr)) : -1;
Packet.cc:	return ip_hdr ? (int) (ntohs(ip_hdr->ip_len)) : -1;
Packet.cc:	return ip_hdr ? (int) (IPLen() - IPHdrLen()) : -1;
Packet.cc:	return tcp_hdr ? (int) (tcp_hdr->th_off * 4) : -1;
Packet.cc:	return tcp_hdr ? (int) (TCPHdrLen() - sizeof(*tcp_hdr)) : -1;
Packet.cc:	return tcp_hdr ? (int) (tcp_hdr->th_sum) : -1;
Packet.cc:	return udp_hdr ? (int) (udp_hdr->uh_sum) : -1;
Packet.cc:	return icmp_hdr ? (int) (icmp_hdr->icmp_type) : -1;
Packet.cc:	return icmp_hdr ? (int) (icmp_hdr->icmp_cksum) : -1;
Packet.cc:		return -1;
Packet.cc:		transport_len = Len() - transport_hdr_offset;
Packet.cc:		+ addr_to_string(ntohl(iphdr->ip_src.s_addr)) 
Packet.cc:		+ addr_to_string(ntohl(iphdr->ip_dst.s_addr));
Packet.cc:	int level = net_hdr_offset_stack.size() - 1;
Packet.cc:	int level = top_level ? 1 : net_hdr_offset_stack.size() - 1;
Packet.cc:	return it->second;
Prefix.cc:	for ( len_ = 32; len_ > 0; --len_ )
Prism.cc:		len = caplen - offset_in;
Prism.cc:#		include "policy/prism-data.anon"
Prism.cc:		Alert("non-IP packet %d", pkt_in->EtherType());
RPerm.cc:	for ( int k = n; k > 0; --k )
RPerm.cc:		int x = perm[k-1];
RPerm.cc:		perm[k-1] = perm[r];
RPerm.cc:	return ~((1 << (8 - n)) - 1);
RPerm.cc:		num_bytes = end_byte - begin_byte;
RPerm.cc:		bits[num_bytes - 1] &= end_mask;
RPerm.cc:		bits[num_bytes - 1] &= end_mask;
RPerm.cc:// Pseudo-random permutation
RPerm.cc:// "Pseudo-random permutation generators and cryptographic composition"
RPerm.cc:		// Generate pseudo-random key2
RPerm.cc:		--output_i;
RPerm.cc:		output[L.num_bytes - 1] |= L.bits[L.num_bytes - 1];
RPerm.cc:		output[output_i - 1] &= R.end_mask;
RPerm.cc:		k = k << (8 - num_bits % 8);
RPerm.cc:	for ( int i = num_bytes - 1; i >= 0; --i )
RPerm.cc:		k = k >> (8 - num_bits % 8);
RPerm.cc:		// now the mapping is s->k
RPerm.cc:			throw Exception("conflict in PRP: %u, %u -> %u",
RPerm.cc:		Note("PRP (over %u): %u -> %u", N, s, k);
Scanner.cc://     e.g., <IP-src, IP-dst> pairs, with AddPossibleScan(), and ScannerSet 
Scanner.cc:	for ( int i = n - 1; i + 1 > max_len; --i )
Scanner.cc:		addr_seq = it->second;
Scanner.cc:	addr_seq->Add(scannee);
Scanner.cc:	if ( addr_seq->LooksLikeSequentialScan() )
Scanner.cc:			scanner_set()->AddScanner(			 \
Scanner.cc:#		include "local-policy/scanner.anon"
Scanner.cc:		if ( pkt_in->NetworkType() == ETHERTYPE_IP )
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_dstaddr", false);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_srcaddr", false);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_dstaddr", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_srcaddr", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_srcaddr", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_srcaddr", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("IP_srcaddr", true);
Scanner.cc:		else if ( pkt_in->NetworkType() == ETHERTYPE_ARP )
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_tpa", false);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_spa", false);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_tpa", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_spa", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_spa", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_spa", true);
Scanner.cc:				peer = pkt_in->GetRegisteredIPAddr("ARP_spa", true);
Scanner.cc:		Alert("cannot get scanner for '%s', network type %x. Exception '%s'", data_name, pkt_in->NetworkType(), e.msg());
Scanner.cc:		case ARP_SCANNER:	return "arp-scanner";
Scanner.cc:		case IP_SCANNER:	return "ip-scanner";
Scanner.cc:			return "unknown-scanner";
Scanner.cc:	scanner_set()->AddPossibleScan(get_scanner(pkt_in, data_name), addr);
Scanner.cc:	if ( scanner_set()->IsScanner(scanner) )
Special.cc:#	include "local-policy/special.anon"
TCP.cc:	const struct ip *iphdr = pkt->IPHeader();
TCP.cc:			pkt->is_embedded_pkt() ? "(embedded) " : "");
TCP.cc:	const struct tcphdr *tcphdr = pkt->TCPHeader();
TCP.cc:		if ( ! pkt->is_embedded_pkt() )
TCP.cc:	// The pseudo-header
TCP.cc:	chksum = ones_complement_checksum(&(iphdr->ip_src), 4, chksum);
TCP.cc:	chksum = ones_complement_checksum(&(iphdr->ip_dst), 4, chksum);
TCP.cc:	u_short proto = htons(iphdr->ip_p);
TCP.cc:	u_short tcplen = htons(pkt->IPPayloadLen());
TCP.cc:		pkt->TransportLen(),
TCP.cc:	return 0xffff - chksum;
TCP.cc:	if ( pkt_in->is_fragmented() )
TCP.cc:	else if ( pkt_in->TransportLen() == pkt_in->IPPayloadLen() )
TCP.cc:				pkt_in->TCPChkSum(), input_checksum);
TCP.cc:				pkt_in->is_embedded_pkt() ? "(embedded) " : "");
TCP.cc:	if ( pkt_in->TCPChkSum() == 0xffff )
TCP.cc:	pkt_out->dump((const u_char *) &new_chksum, 2, offset_out);
TCP.cc:				offset_in, pkt_in->TCPOptionLen(), caplen);
TCP.cc:#			include "policy/tcp-option.anon"
TCP.cc:		len = caplen - offset_in;
TCP.cc:	pkt_out->dump(TCPOPT_NOP, len, offset_out);
TCP.cc:		pkt_in->FlowID().c_str(), len);
TCP.cc:	return (ts1 < ts2) ? ts2 - ts1 : ts1 - ts2;
TCP.cc:		in_network_byte_order = -1; // unknown
TCP.cc:		return it->second;
TCP.cc:	look_up_tcp_ts_seq(host)->add(tcp_ts, net_ts);
TCP.cc:	return look_up_tcp_ts_seq(host)->map(tcp_ts);
TCP.cc:	const struct ip *ih = pkt_in->IPHeader();
TCP.cc:	uint32 src_addr = ntohl(ih->ip_src.s_addr);
TCP.cc:	uint32 dst_addr = ntohl(ih->ip_dst.s_addr);
TCP.cc:	double net_ts = pkt_in->Timestamp();
TCP.cc:	pkt_out->dump(out_ts, len, offset_out);
TCPMkPub.cc:		return ch - '0';
TCPMkPub.cc:		return 10 + (ch - 'a');
TCPMkPub.cc:	const char *key_digest = key_file_digest + len - key_digest_size;
TCPMkPub.cc:		key_file = strdup(".tcpmkpub-key");
TCPMkPub.cc:		if ( key_file[len - key_digest_size - 1] != ':' )
TCPMkPub.cc:		key_file[len - key_digest_size - 1] = '\0';
TCPMkPub.cc:	if ( in_h == -1 )
TCPMkPub.cc:		if ( r == -1 )
TCPMkPub.cc:	if ( strcmp(digest_ascii + 32 - key_digest_size, key_digest) != 0 )
TCPMkPub.cc:	network_time = pkt_in->Timestamp();
TCPMkPub.cc:				pkt_in->Pkt(), pkt_in->Len(),
TCPMkPub.cc:				offset_in, pkt_in->Len(), offset_out,
TCPMkPub.cc:				pkt_in->Pkt(), pkt_in->Len(),
TCPMkPub.cc:				offset_in, pkt_in->Len(), offset_out,
TCPMkPub.cc:	if ( offset_in < (int) pkt_in->Len() && FLAGS_alert_on_trailing_bytes )
TCPMkPub.cc:			pkt_in->Len(), offset_in);
TCPMkPub.cc:	new_hdr.caplen = pkt_out->Len();
TCPMkPub.cc:	// DebugMsg("output packet len = %d, pkt = %p", new_hdr.caplen, pkt_out->Pkt());
TCPMkPub.cc:	pcap_dump((u_char*)dump_d, &new_hdr, (u_char *)pkt_out->Pkt());
TCPMkPub.cc:		return -1;
TCPMkPub.cc:			num_input_files == 0 ? "-" : input_files[trace_i];
TCPMkPub.cc:			num_input_packets = -1;
TCPMkPub.cc:		// Generate the output file name(s) for file-by-file output
TCPMkPub.cc:			scanner_output_file_str = string(pkt_filename) + ".anon-scanners";
TCPMkPub.cc:				num_input_packets - num_output_packets, 
Topology.cc:			subnet->set_gateway(gateway);
Topology.cc:		subnet->add_broadcast(addr);
Topology.cc:	subnet->set_break_up(break_up);
Topology.cc:	subnet->set_export_notes(export_notes);
Topology.cc:	for ( prefix_it = net->prefixes().begin();
Topology.cc:	      prefix_it != net->prefixes().end();
Topology.cc:			subnet->prefix(), &pv) )
Topology.cc:		                subnet->prefix().to_string().c_str());
Topology.cc:	net->add_subnet(subnet);
Topology.cc:// Initialize the topology from local-policy/topology.anon
Topology.cc:		net->add_prefix(Prefix(prefix_str));			\
Topology.cc:#include "local-policy/topology.anon"
Topology.cc:		                "Please check local-policy/topology.anon.");
Topology.cc:		                "Please check local-policy/topology.anon.");
Topology.cc:		topology->add_enterprise_network(it->second);
Topology.cc:		topology->add_enterprise_subnet(*it);
UDP.cc:	const struct ip *iphdr = pkt->IPHeader();
UDP.cc:			pkt->is_embedded_pkt() ? "(embedded) " : "");
UDP.cc:	const struct udphdr *udphdr = pkt->UDPHeader();
UDP.cc:		if ( ! pkt->is_embedded_pkt() )
UDP.cc:	// The pseudo-header
UDP.cc:	chksum = ones_complement_checksum(&(iphdr->ip_src), 4, chksum);
UDP.cc:	chksum = ones_complement_checksum(&(iphdr->ip_dst), 4, chksum);
UDP.cc:	u_short proto = htons(iphdr->ip_p);
UDP.cc:	u_short udplen = htons(pkt->IPPayloadLen());
UDP.cc:		pkt->TransportLen(),
UDP.cc:	return 0xffff - chksum;
UDP.cc:	if ( pkt_in->UDPChkSum() == 0 ) // UDP "no cksum"
UDP.cc:			       pkt_out->FlowID().c_str());
UDP.cc:	if ( pkt_in->is_fragmented() )
UDP.cc:	else if ( pkt_in->TransportLen() == pkt_in->IPPayloadLen() )
UDP.cc:				pkt_in->UDPChkSum(), input_checksum);
UDP.cc:				pkt_in->is_embedded_pkt() ? "(embedded) " : "");
UDP.cc:	pkt_out->dump((const u_char *) &new_chksum, 2, offset_out);
WiFi.cc:	pkt_in->SetLinkHeader(offset_in);
WiFi.cc:	pkt_out->SetLinkHeader(offset_out);
WiFi.cc:	pkt_in->SetLinkType(LINKTYPE_WIFI);
WiFi.cc:	pkt_out->SetLinkType(LINKTYPE_WIFI);
WiFi.cc:		len = caplen - offset_in;
WiFi.cc:	switch ( pkt_in->WiFiType() )
WiFi.cc:#		include "policy/wifi-data.anon"
WiFi.cc:		len = caplen - offset_in;
WiFi.cc:		Alert("non-802.11: Data/Manegment/Control packet %d", pkt_in->WiFiType());
tcpmkpub_keygen.cc:	if ( in_h == -1 )
tcpmkpub_keygen.cc:			buf + read_len, random_input_size - read_len);
tcpmkpub_keygen.cc:		if ( r == -1 )
tcpmkpub_keygen.cc:	if ( out_h == -1 )
tcpmkpub_keygen.cc:	print_hex(stdout, sizeof(key_digest) - 8, key_digest + 8);
tcpmkpub_keygen.cc:	fprintf(stderr, "Usage: %s [-o <output>]\n", exe);
tcpmkpub_keygen.cc:	const char *out = ".tcpmkpub-key";
tcpmkpub_keygen.cc:	while ( (ch = getopt(argc, argv, "o:")) != -1 )
