| 
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -54,43 +54,4 @@ Reads from an input and writes to and output, do things to the content in betwee
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				sendDHCPReply creates a response DHCP packet for the VM and sends it
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func sendDHCPRequest(mt dhcp4.MessageType, reqIP net.IP)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				sendDHCPRequest creates a request DHCP packet for the server and sends it
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# package util // import "proxy/util"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				## Functions
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func DnsQueryDecode(data []byte, start int) (string, int)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				DnsQueryDecode takes encoded hostnames from Microsoft and decodes it
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func DnsQueryEncode(in string) []byte
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				DnsQueryEncode takes string hostnames and encodes it to Microsoft format
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func GenerateMac(customMAC string) net.HardwareAddr
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				GenerateMac generates a random MAC address
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func GenerateUId(path string) string
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				GenerateUId generates a random UId string as hostname
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func GenerateXID() []byte
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				GenerateXID generates a random XID for DHCP
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func WritePIDFile(filename string)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				WritePIDFile writes the processes PID to a given file
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func WritePcap(file string, data []byte)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				WritePcap writes the provided data to a given pcap file
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				## Types
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### type If bool
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				If is a helper type to form expressive ternary expressions being the concatenation of a type conversion and a method call such as:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				`i := If(cond).Int(a, b)`
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				For details, see https://stackoverflow.com/a/59375088/1705598
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func (c If) IP(a, b net.IP) net.IP
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				IP returns a if c is true, b otherwise.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func (c If) If(a, b interface{}) interface{}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				If returns a if c is true, b otherwise.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#### func (c If) MAC(a, b net.HardwareAddr) net.HardwareAddr
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				MAC returns a if c is true, b otherwise.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				sendDHCPRequest creates a request DHCP packet for the server and sends it
 |