return createBind(port)
}
-// BindToInterface is implemented by Bind objects that support being
+// BindSocketToInterface is implemented by Bind objects that support being
// tied to a single network interface.
-type BindToInterface interface {
- BindToInterface4(interfaceIndex uint32, blackhole bool) error
- BindToInterface6(interfaceIndex uint32, blackhole bool) error
+type BindSocketToInterface interface {
+ BindSocketToInterface4(interfaceIndex uint32, blackhole bool) error
+ BindSocketToInterface6(interfaceIndex uint32, blackhole bool) error
}
// An Endpoint maintains the source/destination caching for a peer.
return errors.New("Bind is not yet initialized")
}
- if iface, ok := device.net.bind.(conn.BindToInterface); ok {
- return iface.BindToInterface4(interfaceIndex, blackhole)
+ if iface, ok := device.net.bind.(conn.BindSocketToInterface); ok {
+ return iface.BindSocketToInterface4(interfaceIndex, blackhole)
}
return nil
}
return errors.New("Bind is not yet initialized")
}
- if iface, ok := device.net.bind.(conn.BindToInterface); ok {
- return iface.BindToInterface6(interfaceIndex, blackhole)
+ if iface, ok := device.net.bind.(conn.BindSocketToInterface); ok {
+ return iface.BindSocketToInterface6(interfaceIndex, blackhole)
}
return nil
}