40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			40 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|  | One of our tests wasn't passing and we were debugging and | ||
|  | debugging only to be left scratching our heads. | ||
|  | 
 | ||
|  | It turns out that labels in RDATA are terminated by RLENGTH, | ||
|  | not by null (as most labels are), but since generally CLASS | ||
|  | begins with 0x0001, which looks like a null terminator... in | ||
|  | almost every case, it tooks us forever to figure it out. | ||
|  | 
 | ||
|  | 
 | ||
|  | 			# HEADER | ||
|  | 0000000 25 4f 81 80 00 01 00 02 00 00 00 00 | ||
|  | 
 | ||
|  | 
 | ||
|  | 																			    # NAME | ||
|  | 																						03 61 6f 6c | ||
|  | 0000010 03 63 6f 6d 00 | ||
|  | 											 00 10 00 01 c0 0c | ||
|  | 																			 # TYPE TXT is 16 (0x0010) | ||
|  | 																				 00 10 | ||
|  | 																			 # CLASS IN is 1 (0x0001) | ||
|  | 																							 00 01 | ||
|  | 																			             # TTL | ||
|  | 																										 00 | ||
|  | 0000020 00 07 86 | ||
|  | 							 # RDLENGTH | ||
|  | 								 00 1f | ||
|  |                      # DATA | ||
|  | 											 1e 73 70 66 32 2e 30 2f 70 72 61 | ||
|  | 0000030 20 70 74 72 3a 6d 78 2e 61 6f 6c 2e 63 6f 6d 20 | ||
|  | 0000040 3f 61 6c 6c | ||
|  |                 # NOT NULL TERMINATED!! | ||
|  | 
 | ||
|  |                 # NEXT RECORD | ||
|  | 
 | ||
|  | 										c0 0c | ||
|  | 													00 10 00 01 00 00 07 86 00 1b | ||
|  | 0000050 1a 76 3d 73 70 66 31 20 70 74 72 3a 6d 78 2e 61 | ||
|  | 0000060 6f 6c 2e 63 6f 6d 20 3f 61 6c 6c | ||
|  | 000006b |