Documentation
¶
Index ¶
Constants ¶
View Source
const ( DNSTypeA = 1 DNSTypeNS = 2 DNSTypeMD = 3 DNSTypeMF = 4 DNSTypeCNAME = 5 DNSTypeSOA = 6 DNSTypeMB = 7 DNSTypeMG = 8 DNSTypeMR = 9 DNSTypeNULL = 10 DNSTypeWKS = 11 DNSTypePTR = 12 DNSTypeHINFO = 13 DNSTypeMINFO = 14 DNSTypeMX = 15 DNSTypeTXT = 16 DNSTypeAAAA = 28 )
dns type const
View Source
const ( DCIN = 1 DCCS = 2 DCCH = 3 DCHS = 4 )
dns class const
View Source
const ( MySQLSleep = 0x00 // 0 MySQLQuit = 0x01 // 1, mysql_close MySQLInitDB = 0x02 // 2, mysql_select_db MySQLQuery = 0x03 // 3, mysql_real_query MySQLFieldList = 0x04 // 4, mysql_list_fields MySQLCreateDB = 0x05 // 5, mysql_create_db MySQLDropDB = 0x06 // 6, mysql_drop_db MySQLRefresh = 0x07 // 7, mysql_refresh MySQLShutdown = 0x08 // 8, mysql_shutdown MySQLStatistics = 0x09 // 9, mysql_stat MySQLProcessInfo = 0x0A // 10, mysql_list_processes MySQLConnect = 0x0B // 11 MySQLProcessKill = 0x0C // 12, mysql_kill MySQLDebug = 0x0D // 13, mysql_dump_debug_info MySQLPing = 0x0E // 14, mysql_ping MySQLTime = 0x0F // 15 MySQLDelayedInsert = 0x10 // 16 MySQLChangeUser = 0x11 // 17, mysql_change_user MySQLBinglogDump = 0x12 // 18 MySQLTableDump = 0x13 // 19 MySQLConnectOut = 0x14 // 20 MySQLRegisterSlave = 0x15 // 21 MySQLStmtPrepare = 0x16 // 22, mysql_stmt_prepare MySQLStmtExecute = 0x17 // 23, mysql_stmt_execute MySQLStmtSendLongData = 0x18 // 24, mysql_stmt_send_long_data MySQLStmtClose = 0x19 // 25, mysql_stmt_close MySQLStmtReset = 0x1A // 26, mysql_stmt_reset MySQLSetOption = 0x1B // 27, mysql_set_server_option MySQLStmtFetch = 0x1C // 28, mysql_stmt_fetch )
Mysql client request type in payload body
View Source
const ( MySQLOK = 0x00 MySQLError = 0xFF MySQLEOF = 0xFE )
Mysql server response type in payload body
View Source
const ( RAW = "raw" DNS = "dns" HTTP = "http" Redis = "redis" Memcached = "memcached" MySQL = "mysql" )
Parse parse packets
View Source
const ( RedisError = '-' RedisSimpleString = '+' RedisInterger = ':' RedisBulkString = '$' RedisArray = '*' )
Redis payload first char
View Source
const DefaultParser = Redis
DefaultParser default protocol type
Variables ¶
DNSClass class fields appear in resource records
View Source
var DNSType = map[int]string{ DNSTypeA: "A", DNSTypeNS: "NS", DNSTypeMD: "MD", DNSTypeMF: "MF", DNSTypeCNAME: "CNAME", DNSTypeSOA: "SOA", DNSTypeMB: "MB", DNSTypeMG: "MG", DNSTypeMR: "MR", DNSTypeNULL: "NULL", DNSTypeWKS: "WKS", DNSTypePTR: "PTR", DNSTypeHINFO: "HINFO", DNSTypeMINFO: "MINFO", DNSTypeMX: "MX", DNSTypeTXT: "TXT", DNSTypeAAAA: "AAAA", }
DNSType type fields are used in resource records
View Source
var NoReplyCommands = []string{
"get", "gets", "stats", "stat", "watch", "lru",
"set", "add", "incr", "decr", "delete", "replace",
"append", "prepend", "cas", "touch", "flushall",
}
NoReplyCommands no reply commands
Functions ¶
This section is empty.
Types ¶
type Packet ¶
type Packet struct { Type string Request bool Direction string SrcID string SrcMAC string SrcIP string SrcPort string DstID string DstMAC string DstIP string DstPort string CheckSum string Sequence string ACK string Flag int FlagStr string Payload string PayloadLen int Content string Timestap time.Time Ignore bool }
Packet packet
Click to show internal directories.
Click to hide internal directories.