func NewDNSKey(tt kernel.TrafficType, cookie Cookie, layer uint8, dns string) (*DNSKey, error) {
	encodedName, err := utils.EncodeDNS(dns)
	if err != nil {
		return nil, errors.Wrap(err, "couldn't encode DNS name")
	}
	rep := DNSKey{
		TrafficType: tt,
		Cookie:      cookie,
		Layer:       layer,
		DNS:         encodedName,
	}
	return &rep, nil
}
// NewDNSKey - Creates a new DNSKey and encodes the domain string appropriately
Creates a new DNSKey and encodes the domain string appropriately
// NewDNSKey - Creates a new DNSKey and encodes the domain string appropriately
func NewDNSKey(tt kernel.TrafficType, cookie Cookie, layer uint8, dns string) (*DNSKey, error) {
	encodedName, err := utils.EncodeDNS(dns)
	if err != nil {
		return nil, errors.Wrap(err, "couldn't encode DNS name")
	}
	rep := DNSKey{
		TrafficType: tt,
		Cookie:      cookie,
		Layer:       layer,
		DNS:         encodedName,
	}
	return &rep, nil
}
func NewDNSKey ( tt kernel . TrafficType , cookie Cookie , layer uint8 , dns string ) ( * DNSKey , error ) { encodedName , err := utils . EncodeDNS ( dns ) if err != nil { return nil , errors . Wrap ( err , " " ) } rep := DNSKey { TrafficType : tt , Cookie : cookie , Layer : layer , DNS : encodedName , } return & rep , nil }
Creates a new DNSKey and encodes the domain string appropriately
Creates a new DNSKey and encodes the domain string appropriately