github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/controller/internal/enforcer/dnsproxy/dns_unsupported.go (about) 1 // +build !linux,!windows 2 3 package dnsproxy 4 5 import ( 6 "context" 7 "net" 8 9 "go.aporeto.io/enforcerd/trireme-lib/collector" 10 "go.aporeto.io/enforcerd/trireme-lib/controller/pkg/flowtracking" 11 "go.aporeto.io/enforcerd/trireme-lib/controller/pkg/pucontext" 12 "go.aporeto.io/enforcerd/trireme-lib/policy" 13 "go.aporeto.io/enforcerd/trireme-lib/utils/cache" 14 ) 15 16 // Proxy struct represents the object for dns proxy 17 type Proxy struct { 18 } 19 20 // New creates an instance of the dns proxy 21 func New(ctx context.Context, puFromID cache.DataStore, conntrack flowtracking.FlowClient, c collector.EventCollector) *Proxy { 22 return &Proxy{} 23 } 24 25 // ShutdownDNS shuts down the dns server for contextID 26 func (p *Proxy) ShutdownDNS(contextID string) { 27 28 } 29 30 // StartDNSServer starts the dns server on the port provided for contextID 31 func (p *Proxy) StartDNSServer(ctx context.Context, contextID, port string) error { 32 return nil 33 } 34 35 // SyncWithPlatformCache is only needed in Windows currently 36 func (p *Proxy) SyncWithPlatformCache(ctx context.Context, pctx *pucontext.PUContext) error { 37 return nil 38 } 39 40 // HandleDNSResponsePacket is only needed in Windows currently 41 func (p *Proxy) HandleDNSResponsePacket(dnsPacketData []byte, sourceIP net.IP, sourcePort uint16, destIP net.IP, destPort uint16, puFromContextID func(string) (*pucontext.PUContext, error)) error { 42 return nil 43 } 44 45 // Enforce starts enforcing policies for the given policy.PUInfo. 46 func (p *Proxy) Enforce(ctx context.Context, contextID string, puInfo *policy.PUInfo) error { 47 return nil 48 } 49 50 // Unenforce stops enforcing policy for the given IP. 51 func (p *Proxy) Unenforce(_ context.Context, contextID string) error { 52 return nil 53 }