Documentation ¶
Index ¶
- func JoinASM(address string, ifi *net.Interface) (*ipv4.PacketConn, error)
- func JoinSSM(address string, sourceAddress string, ifi *net.Interface) (*ipv4.PacketConn, error)
- func LeaveASM(address string, ifi *net.Interface, conn *ipv4.PacketConn) error
- func LeaveSSM(address string, sourceAddress string, ifi *net.Interface, ...) error
- func Listen(packetConn *ipv4.PacketConn, ...) error
- func Receive(address string, sourceAddress string, ifi *net.Interface, ...) error
- func Send(address string, localaddress string, content_byte []byte, intervalns int, ...) error
- type Packet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LeaveSSM ¶
func LeaveSSM(address string, sourceAddress string, ifi *net.Interface, conn *ipv4.PacketConn) error
LeaveSSM: Leave the SSM group
func Listen ¶
func Listen(packetConn *ipv4.PacketConn, handler func(*ipv4.ControlMessage, net.Addr, int, []byte)) error
Listen: loop and handle the log
Types ¶
type Packet ¶
type Packet struct { TTL int Port int Address net.IP RouterAlert bool Raw bool IGMPVersion int // 1, 2, or 3 Interface *net.Interface Message []byte Protocol string // 'udp' or 'ip:2'/'ip4:2' TargetAddr *net.UDPAddr LocalAddress *net.UDPAddr TOS int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.