This commit is contained in:
crusader
2017-11-22 14:55:40 +09:00
parent 3f730e1fe4
commit 2e81139374
35 changed files with 117 additions and 1567 deletions

View File

@@ -109,8 +109,8 @@ func (t *DNSMatcher) Match(info matcher.MatchInfo, index int, packet *matcher.Pa
return true
}
func (t *DNSMatcher) IsSend(info matcher.MatchInfo) bool {
if 53 == info.Port() {
func (t *DNSMatcher) IsSend(port int) bool {
if 53 == port {
return true
}
return false

View File

@@ -14,7 +14,7 @@ type Matcher interface {
type UDPMatcher interface {
Matcher
IsSend(info MatchInfo) bool
IsSend(port int) bool
}
type Matchers struct {

View File

@@ -118,8 +118,8 @@ func (t *SNMPMatcher) Match(info matcher.MatchInfo, index int, packet *matcher.P
}
func (t *SNMPMatcher) IsSend(info matcher.MatchInfo) bool {
if info.Port() == 161 {
func (t *SNMPMatcher) IsSend(port int) bool {
if 161 == port {
return true
}
return false

View File

@@ -130,8 +130,8 @@ func (t *SNMPMatcher) Match(info matcher.MatchInfo, index int, packet *matcher.P
}
func (t *SNMPMatcher) IsSend(info matcher.MatchInfo) bool {
if info.Port() == 161 {
func (t *SNMPMatcher) IsSend(port int) bool {
if 161 == port {
return true
}
return false