Documentation ¶
Index ¶
- func CanProcessByType(Type DnsRRType) bool
- func GetAllDnsRRTypeStringList() []string
- func IsInDomainSuffixSet(domain string, m map[string]struct{}) bool
- func IsInMatchOut(in DnsPacket, out DnsPacket) bool
- func IsLookLikeFakePacket(out DnsPacket) bool
- func NormalizeDomain(domain string) string
- func PacketWriteToByteSlice(packet DnsPacket, buf []byte) (outBuf []byte, errMsg string)
- type DnsPacket
- func (packet DnsPacket) GetBinaryLen() int
- func (packet DnsPacket) GetNormalizeQuestionName() string
- func (packet DnsPacket) GetOpcode() int
- func (packet DnsPacket) GetRcode() Rcode
- func (packet *DnsPacket) HasPlainResult(result string) bool
- func (packet DnsPacket) IsAuthenticatedData() bool
- func (packet DnsPacket) IsAuthoritative() bool
- func (packet DnsPacket) IsBitReserverd9() bool
- func (packet DnsPacket) IsCheckingDisabled() bool
- func (packet DnsPacket) IsRecursionAvailable() bool
- func (packet DnsPacket) IsRecursionDesired() bool
- func (packet DnsPacket) IsResponse() bool
- func (packet DnsPacket) IsTruncated() bool
- func (packet *DnsPacket) SetIsAuthenticatedData(is bool)
- func (packet *DnsPacket) SetIsRecursionAvailable(is bool)
- func (packet *DnsPacket) SetIsRecursionDesired(is bool)
- func (packet *DnsPacket) SetIsResponse(is bool)
- func (packet *DnsPacket) SetRcode(code Rcode)
- func (packet *DnsPacket) ShuffleAnswer()
- func (packet DnsPacket) String() (out string)
- type DnsRR
- func (rr DnsRR) GetMx() (out DnsRRMX)
- func (rr DnsRR) GetNormalizeName() string
- func (rr DnsRR) GetSoa() (out DnsRRSoa)
- func (rr DnsRR) GetSrv() (out DnsRRSrv)
- func (rr DnsRR) GetTxt() (out []string)
- func (rr *DnsRR) SetMx(in DnsRRMX)
- func (rr *DnsRR) SetSoa(in DnsRRSoa)
- func (rr *DnsRR) SetSrv(in DnsRRSrv)
- func (rr *DnsRR) SetTxt(in []string)
- type DnsRRMX
- type DnsRRSoa
- type DnsRRSrv
- type DnsRRType
- type Rcode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanProcessByType ¶
func GetAllDnsRRTypeStringList ¶
func GetAllDnsRRTypeStringList() []string
func IsInDomainSuffixSet ¶
func IsInMatchOut ¶
func IsLookLikeFakePacket ¶
func NormalizeDomain ¶
Types ¶
type DnsPacket ¶
type DnsPacket struct { Id uint16 Bits uint16 QuestionName string QuestionType DnsRRType AnswerList []DnsRR HasEdns4096 bool IsWriteAnsToAuthority bool Ancount uint16 Nscount uint16 Arcount uint16 HasCompressDomain bool }
func NewDnsPacketForRequest ¶
func PacketReadFromByteSlice ¶
func (DnsPacket) GetBinaryLen ¶
func (DnsPacket) GetNormalizeQuestionName ¶
func (*DnsPacket) HasPlainResult ¶
func (DnsPacket) IsAuthenticatedData ¶
func (DnsPacket) IsAuthoritative ¶
func (DnsPacket) IsBitReserverd9 ¶
func (DnsPacket) IsCheckingDisabled ¶
func (DnsPacket) IsRecursionAvailable ¶
func (DnsPacket) IsRecursionDesired ¶
func (DnsPacket) IsResponse ¶
func (DnsPacket) IsTruncated ¶
func (*DnsPacket) SetIsAuthenticatedData ¶
func (*DnsPacket) SetIsRecursionAvailable ¶
func (*DnsPacket) SetIsRecursionDesired ¶
func (*DnsPacket) SetIsResponse ¶
func (*DnsPacket) ShuffleAnswer ¶
func (packet *DnsPacket) ShuffleAnswer()
type DnsRR ¶
func (DnsRR) GetNormalizeName ¶
type DnsRRType ¶
type DnsRRType uint16
const ( DnsPort = 53 DnsTypeNone DnsRRType = 0 DnsTypeA DnsRRType = 1 DnsTypeNS DnsRRType = 2 DnsTypeCNAME DnsRRType = 5 DnsTypeSOA DnsRRType = 6 DnsTypePTR DnsRRType = 12 DnsTypeMX DnsRRType = 15 DnsTypeTXT DnsRRType = 16 DnsTypeAAAA DnsRRType = 28 DnsTypeSRV DnsRRType = 33 DnsTypeMD DnsRRType = 3 DnsTypeMF DnsRRType = 4 DnsTypeMB DnsRRType = 7 DnsTypeMG DnsRRType = 8 DnsTypeMR DnsRRType = 9 DnsTypeNULL DnsRRType = 10 DnsTypeWKS DnsRRType = 11 DnsTypeHINFO DnsRRType = 13 DnsTypeMINFO DnsRRType = 14 DnsTypeRP DnsRRType = 17 DnsTypeAFSDB DnsRRType = 18 DnsTypeX25 DnsRRType = 19 DnsTypeISDN DnsRRType = 20 DnsTypeRT DnsRRType = 21 DnsTypeNSAPPTR DnsRRType = 23 DnsTypeSIG DnsRRType = 24 DnsTypeKEY DnsRRType = 25 DnsTypePX DnsRRType = 26 DnsTypeGPOS DnsRRType = 27 DnsTypeLOC DnsRRType = 29 DnsTypeNXT DnsRRType = 30 DnsTypeEID DnsRRType = 31 DnsTypeNIMLOC DnsRRType = 32 DnsTypeATMA DnsRRType = 34 DnsTypeNAPTR DnsRRType = 35 DnsTypeKX DnsRRType = 36 DnsTypeCERT DnsRRType = 37 DnsTypeDNAME DnsRRType = 39 DnsTypeOPT DnsRRType = 41 DnsTypeDS DnsRRType = 43 DnsTypeSSHFP DnsRRType = 44 DnsTypeIPSECKEY DnsRRType = 45 DnsTypeRRSIG DnsRRType = 46 DnsTypeNSEC DnsRRType = 47 DnsTypeDNSKEY DnsRRType = 48 DnsTypeDHCID DnsRRType = 49 DnsTypeNSEC3 DnsRRType = 50 DnsTypeNSEC3PARAM DnsRRType = 51 DnsTypeTLSA DnsRRType = 52 DnsTypeHIP DnsRRType = 55 DnsTypeNINFO DnsRRType = 56 DnsTypeRKEY DnsRRType = 57 DnsTypeTALINK DnsRRType = 58 DnsTypeCDS DnsRRType = 59 DnsTypeCDNSKEY DnsRRType = 60 DnsTypeOPENPGPKEY DnsRRType = 61 DnsTypeSPF DnsRRType = 99 DnsTypeUINFO DnsRRType = 100 DnsTypeUID DnsRRType = 101 DnsTypeGID DnsRRType = 102 DnsTypeUNSPEC DnsRRType = 103 DnsTypeNID DnsRRType = 104 DnsTypeL32 DnsRRType = 105 DnsTypeL64 DnsRRType = 106 DnsTypeLP DnsRRType = 107 DnsTypeEUI48 DnsRRType = 108 DnsTypeEUI64 DnsRRType = 109 DnsTypeTKEY DnsRRType = 249 DnsTypeTSIG DnsRRType = 250 DnsTypeIXFR DnsRRType = 251 DnsTypeAXFR DnsRRType = 252 DnsTypeMAILB DnsRRType = 253 DnsTypeMAILA DnsRRType = 254 DnsTypeANY DnsRRType = 255 DnsTypeURI DnsRRType = 256 DnsTypeCAA DnsRRType = 257 DnsTypeTA DnsRRType = 32768 DnsTypeDLV DnsRRType = 32769 )
func GetDnsRRTypeFromString ¶
Click to show internal directories.
Click to hide internal directories.