mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-10-10 06:39:18 +08:00
add communicator api
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package capture
|
||||
|
||||
import (
|
||||
sd "github.com/zr-hebo/sniffer-agent/session-dealer"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"sync"
|
||||
sd "github.com/zr-hebo/sniffer-agent/session-dealer"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
localIPAddr *string
|
||||
|
||||
sessionPool = make(map[string]sd.ConnSession)
|
||||
sessionPoolLock sync.Mutex
|
||||
// sessionPoolLock sync.Mutex
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -21,4 +22,6 @@ func init() {
|
||||
|
||||
localIPAddr = &ipAddr
|
||||
log.Infof("parsed local ip address:%s", *localIPAddr)
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
Reference in New Issue
Block a user