Version and update verdict kernel functions
This commit is contained in:
@@ -6,6 +6,7 @@ package windowskext
|
||||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/tevino/abool"
|
||||
@@ -50,6 +51,23 @@ type VerdictInfo struct {
|
||||
verdict network.Verdict // verdict for the connection
|
||||
}
|
||||
|
||||
type VerdictUpdateInfo struct {
|
||||
ipV6 uint8 //True: IPv6, False: IPv4
|
||||
protocol uint8 //Protocol (UDP, TCP, ...)
|
||||
localIP [4]uint32 //Source Address, only srcIP[0] if IPv4
|
||||
remoteIP [4]uint32 //Destination Address
|
||||
localPort uint16 //Source Port
|
||||
remotePort uint16 //Destination port
|
||||
verdict uint8 //New verdict
|
||||
}
|
||||
|
||||
type VersionInfo struct {
|
||||
major uint8
|
||||
minor uint8
|
||||
revision uint8
|
||||
build uint8
|
||||
}
|
||||
|
||||
// Handler transforms received packets to the Packet interface.
|
||||
func Handler(packets chan packet.Packet) {
|
||||
if !ready.IsSet() {
|
||||
@@ -152,3 +170,7 @@ func convertIPv6(input [4]uint32) net.IP {
|
||||
}
|
||||
return net.IP(addressBuf)
|
||||
}
|
||||
|
||||
func (v *VersionInfo) String() string {
|
||||
return fmt.Sprintf("%d.%d.%d.%d", v.major, v.minor, v.revision, v.build)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user