Documentation ¶
Index ¶
- Constants
- func SCTPAccept(fd int) (int, error)
- func SCTPAddrFamily(laddr *SCTPAddr, raddr *SCTPAddr) (family int, ipv6only bool)
- func SCTPBind(fd int, addr *SCTPAddr, flags int) error
- func SCTPClose(fd int) error
- func SCTPConnect(fd int, addr *SCTPAddr) (int, error)
- func SCTPGetEvents(fd int) (int, error)
- func SCTPGetNonblocking(fd int) (bool, error)
- func SCTPListen(fd int) error
- func SCTPPeelOff(fd int, associd int32) (int, error)
- func SCTPSetDefaultSentParam(fd int, info *SndRcvInfo) error
- func SCTPSetDefaultSockopts(s int, family int, ipv6only bool) error
- func SCTPSetEvents(fd, flags int) error
- func SCTPSetInitOpts(fd int, options InitMsg) error
- func SCTPSetNonblocking(fd int, nonblocking bool) error
- func SCTPSocket(af int, mode SCTPSocketMode) (int, error)
- func SCTPWrite(fd int, b []byte, info *SndRcvInfo) (int, error)
- type AdaptationIndication
- type AssociationChange
- type Authentication
- type EventSubscribe
- type GetAddrsOld
- type InitMsg
- type Notification
- func (n *Notification) GetAdaptationIndication() *AdaptationIndication
- func (n *Notification) GetAssociationChange() *AssociationChange
- func (n *Notification) GetAuthentication() *Authentication
- func (n *Notification) GetPartialDelivery() *PartialDelivery
- func (n *Notification) GetPeerAddrChange() *PeerAddrChange
- func (n *Notification) GetRemoteError() *RemoteError
- func (n *Notification) GetSendFailed() *SendFailed
- func (n *Notification) GetSenderDry() *SenderDry
- func (n *Notification) Header() *NotificationHeader
- func (n *Notification) Type() SCTPNotificationType
- type NotificationHeader
- type NxtInfo
- type OOBMessage
- type PartialDelivery
- type PeerAddrChange
- type PeerChangeState
- type RemoteError
- type SCTPAddr
- type SCTPAddressFamily
- type SCTPCmsgType
- type SCTPConn
- func (c *SCTPConn) Bind(laddr *SCTPAddr) error
- func (c *SCTPConn) Close() error
- func (c *SCTPConn) Connect(raddr *SCTPAddr) error
- func (c *SCTPConn) FD() int
- func (c *SCTPConn) GetDefaultSentParam() (*SndRcvInfo, error)
- func (c *SCTPConn) GetEvents() (int, error)
- func (c *SCTPConn) GetNonblocking() (bool, error)
- func (c *SCTPConn) GetSocketMode() (SCTPSocketMode, error)
- func (c *SCTPConn) Listen() error
- func (c *SCTPConn) LocalAddr() net.Addr
- func (c *SCTPConn) PeelOff(id int32) (*SCTPConn, error)
- func (c *SCTPConn) Read(b []byte) (int, error)
- func (c *SCTPConn) RemoteAddr() net.Addr
- func (c *SCTPConn) SCTPGetPrimaryPeerAddr() (*SCTPAddr, error)
- func (c *SCTPConn) SCTPLocalAddr(id uint16) (*SCTPAddr, error)
- func (c *SCTPConn) SCTPRead(b []byte) (int, *OOBMessage, int, error)
- func (c *SCTPConn) SCTPRemoteAddr(id uint16) (*SCTPAddr, error)
- func (c *SCTPConn) SCTPWrite(b []byte, info *SndRcvInfo) (int, error)
- func (c *SCTPConn) SetDeadline(t time.Time) error
- func (c *SCTPConn) SetDefaultSentParam(info *SndRcvInfo) error
- func (c *SCTPConn) SetEvents(flags int) error
- func (c *SCTPConn) SetNonblocking(val bool) error
- func (c *SCTPConn) SetReadDeadline(t time.Time) error
- func (c *SCTPConn) SetWriteDeadline(t time.Time) error
- func (c *SCTPConn) Write(b []byte) (int, error)
- type SCTPListener
- type SCTPNotificationType
- type SCTPSocketMode
- type SCTPState
- type SendFailed
- type SenderDry
- type SndInfo
- type SndRcvInfo
Constants ¶
View Source
const ( SOL_SCTP = 132 SCTP_BINDX_ADD_ADDR = 0x01 SCTP_BINDX_REM_ADDR = 0x02 MSG_NOTIFICATION = 0x8000 //C.MSG_NOTIFICATION MSG_EOR = 0x80 //C.MSG_EOR )
View Source
const ( SCTP_RTOINFO = iota SCTP_ASSOCINFO SCTP_INITMSG SCTP_NODELAY SCTP_AUTOCLOSE SCTP_SET_PEER_PRIMARY_ADDR SCTP_PRIMARY_ADDR SCTP_ADAPTATION_LAYER SCTP_DISABLE_FRAGMENTS SCTP_PEER_ADDR_PARAMS SCTP_DEFAULT_SENT_PARAM SCTP_EVENTS SCTP_I_WANT_MAPPED_V4_ADDR SCTP_MAXSEG SCTP_STATUS SCTP_GET_PEER_ADDR_INFO SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK = SCTP_DELAYED_ACK_TIME SCTP_DELAYED_SACK = SCTP_DELAYED_ACK_TIME SCTP_SOCKOPT_BINDX_ADD = 100 SCTP_SOCKOPT_BINDX_REM = 101 SCTP_SOCKOPT_PEELOFF = 102 SCTP_GET_PEER_ADDRS = 108 SCTP_GET_LOCAL_ADDRS = 109 SCTP_SOCKOPT_CONNECTX = 110 SCTP_SOCKOPT_CONNECTX3 = 111 )
View Source
const ( SCTP_EVENT_DATA_IO = 1 << iota SCTP_EVENT_ASSOCIATION SCTP_EVENT_ADDRESS SCTP_EVENT_SEND_FAILURE SCTP_EVENT_PEER_ERROR SCTP_EVENT_SHUTDOWN SCTP_EVENT_PARTIAL_DELIVERY SCTP_EVENT_ADAPTATION_LAYER SCTP_EVENT_AUTHENTICATION SCTP_EVENT_SENDER_DRY SCTP_EVENT_ALL = SCTP_EVENT_DATA_IO | SCTP_EVENT_ASSOCIATION | SCTP_EVENT_ADDRESS | SCTP_EVENT_SEND_FAILURE | SCTP_EVENT_PEER_ERROR | SCTP_EVENT_SHUTDOWN | SCTP_EVENT_PARTIAL_DELIVERY | SCTP_EVENT_ADAPTATION_LAYER | SCTP_EVENT_AUTHENTICATION | SCTP_EVENT_SENDER_DRY )
View Source
const ( SCTP_SN_TYPE_BASE = SCTPNotificationType(iota + (1 << 15)) SCTP_ASSOC_CHANGE SCTP_PEER_ADDR_CHANGE SCTP_SEND_FAILED SCTP_REMOTE_ERROR SCTP_SHUTDOWN_EVENT SCTP_PARTIAL_DELIVERY_EVENT SCTP_ADAPTATION_INDICATION SCTP_AUTHENTICATION_INDICATION SCTP_SENDER_DRY_EVENT )
View Source
const ( SCTP_CMSG_INIT = SCTPCmsgType(iota) SCTP_CMSG_SNDRCV SCTP_CMSG_SNDINFO SCTP_CMSG_RCVINFO SCTP_CMSG_NXTINFO )
View Source
const ( SCTP_UNORDERED = 1 << iota SCTP_ADDR_OVER SCTP_ABORT SCTP_SACK_IMMEDIATELY SCTP_EOF )
View Source
const ( SCTP_COMM_UP = SCTPState(iota) SCTP_COMM_LOST SCTP_RESTART SCTP_SHUTDOWN_COMP SCTP_CANT_STR_ASSOC )
View Source
const ( SCTP4 = SCTPAddressFamily(iota) SCTP6 SCTP6Only )
View Source
const ( OneToOne = SCTPSocketMode(iota) OneToMany )
View Source
const ( SCTP_ADDR_AVAILABLE = iota SCTP_ADDR_UNREACHABLE SCTP_ADDR_REMOVED SCTP_ADDR_ADDED SCTP_ADDR_MADE_PRIM )
View Source
const (
SCTP_MAX_STREAM = 0xffff
)
Variables ¶
This section is empty.
Functions ¶
func SCTPAccept ¶
func SCTPAddrFamily ¶
func SCTPGetEvents ¶
func SCTPGetNonblocking ¶
func SCTPListen ¶
func SCTPSetDefaultSentParam ¶
func SCTPSetDefaultSentParam(fd int, info *SndRcvInfo) error
func SCTPSetDefaultSockopts ¶
from https://github.com/golang/go Changes: it is for SCTP only
func SCTPSetEvents ¶
func SCTPSetInitOpts ¶
func SCTPSetNonblocking ¶
func SCTPSocket ¶
func SCTPSocket(af int, mode SCTPSocketMode) (int, error)
Types ¶
type AdaptationIndication ¶
type AdaptationIndication struct { Type SCTPNotificationType Flags uint16 Length uint32 Indication uint32 AssocID int32 }
type AssociationChange ¶
type Authentication ¶
type EventSubscribe ¶
type GetAddrsOld ¶
type InitMsg ¶
type InitMsg struct { NumOstreams uint16 MaxInstreams uint16 MaxAttempts uint16 MaxInitTimeout uint16 }
func NewDefaultInitMsg ¶
func NewDefaultInitMsg() *InitMsg
func SCTPGetInitOpts ¶
type Notification ¶
type Notification struct {
Data []byte
}
func SCTPParseNotification ¶
func SCTPParseNotification(b []byte) (*Notification, error)
func (*Notification) GetAdaptationIndication ¶
func (n *Notification) GetAdaptationIndication() *AdaptationIndication
func (*Notification) GetAssociationChange ¶
func (n *Notification) GetAssociationChange() *AssociationChange
func (*Notification) GetAuthentication ¶
func (n *Notification) GetAuthentication() *Authentication
func (*Notification) GetPartialDelivery ¶
func (n *Notification) GetPartialDelivery() *PartialDelivery
func (*Notification) GetPeerAddrChange ¶
func (n *Notification) GetPeerAddrChange() *PeerAddrChange
func (*Notification) GetRemoteError ¶
func (n *Notification) GetRemoteError() *RemoteError
func (*Notification) GetSendFailed ¶
func (n *Notification) GetSendFailed() *SendFailed
func (*Notification) GetSenderDry ¶
func (n *Notification) GetSenderDry() *SenderDry
func (*Notification) Header ¶
func (n *Notification) Header() *NotificationHeader
func (*Notification) Type ¶
func (n *Notification) Type() SCTPNotificationType
type NotificationHeader ¶
type NotificationHeader struct { Type SCTPNotificationType Flags uint16 Length uint32 }
type OOBMessage ¶
type OOBMessage struct {
syscall.SocketControlMessage
}
func SCTPParseOOB ¶
func SCTPParseOOB(b []byte) (*OOBMessage, error)
func (*OOBMessage) GetNxtInfo ¶
func (o *OOBMessage) GetNxtInfo() *NxtInfo
func (*OOBMessage) GetSndInfo ¶
func (o *OOBMessage) GetSndInfo() *SndInfo
func (*OOBMessage) GetSndRcvInfo ¶
func (o *OOBMessage) GetSndRcvInfo() *SndRcvInfo
func (*OOBMessage) IsSCTP ¶
func (o *OOBMessage) IsSCTP() bool
func (*OOBMessage) Type ¶
func (o *OOBMessage) Type() SCTPCmsgType
type PartialDelivery ¶
type PeerAddrChange ¶
type PeerAddrChange struct { Type SCTPNotificationType Length uint32 Addr [128]byte //C.struct_sockaddr_storage State PeerChangeState Error uint32 AssocID int32 }
type PeerChangeState ¶
type PeerChangeState uint32
type RemoteError ¶
type SCTPAddr ¶
type SCTPAddr struct { IPAddrs []net.IPAddr Port int AddressFamily SCTPAddressFamily }
func ResolveSCTPAddr ¶
func ResolveSCTPAddr(addressFamily SCTPAddressFamily, addrs string) (*SCTPAddr, error)
func (*SCTPAddr) ToRawSockAddrBuf ¶
type SCTPAddressFamily ¶
type SCTPAddressFamily int
func (SCTPAddressFamily) String ¶
func (af SCTPAddressFamily) String() string
func (SCTPAddressFamily) ToSyscall ¶
func (af SCTPAddressFamily) ToSyscall() int
type SCTPCmsgType ¶
type SCTPCmsgType int32
type SCTPConn ¶
type SCTPConn struct {
// contains filtered or unexported fields
}
func NewSCTPConnection ¶
func NewSCTPConnection(laddr *SCTPAddr, af SCTPAddressFamily, options InitMsg, mode SCTPSocketMode, nonblocking bool) (*SCTPConn, error)
func (*SCTPConn) GetDefaultSentParam ¶
func (c *SCTPConn) GetDefaultSentParam() (*SndRcvInfo, error)
func (*SCTPConn) GetNonblocking ¶
func (*SCTPConn) GetSocketMode ¶
func (c *SCTPConn) GetSocketMode() (SCTPSocketMode, error)
func (*SCTPConn) RemoteAddr ¶
func (*SCTPConn) SCTPGetPrimaryPeerAddr ¶
func (*SCTPConn) SetDefaultSentParam ¶
func (c *SCTPConn) SetDefaultSentParam(info *SndRcvInfo) error
func (*SCTPConn) SetNonblocking ¶
type SCTPListener ¶
type SCTPListener struct { SCTPConn // contains filtered or unexported fields }
func NewSCTPListener ¶
func NewSCTPListener(laddr *SCTPAddr, init InitMsg, mode SCTPSocketMode, nonblocking bool) (*SCTPListener, error)
func (*SCTPListener) Accept ¶
func (ln *SCTPListener) Accept() (net.Conn, error)
Accept waits for and returns the next connection connection to the listener.
func (*SCTPListener) AcceptSCTP ¶
func (ln *SCTPListener) AcceptSCTP() (*SCTPConn, error)
AcceptSCTP waits for and returns the next SCTP connection to the listener.
func (*SCTPListener) Addr ¶
func (ln *SCTPListener) Addr() net.Addr
func (*SCTPListener) SCTPRead ¶
func (ln *SCTPListener) SCTPRead(b []byte) (int, *OOBMessage, int, error)
func (*SCTPListener) SCTPWrite ¶
func (ln *SCTPListener) SCTPWrite(b []byte, info *SndRcvInfo) (int, error)
type SCTPNotificationType ¶
type SCTPNotificationType uint16
func (SCTPNotificationType) String ¶
func (n SCTPNotificationType) String() string
type SCTPSocketMode ¶
type SCTPSocketMode int
func SCTPGetSocketMode ¶
func SCTPGetSocketMode(fd int) (SCTPSocketMode, error)
type SendFailed ¶
type SenderDry ¶
type SenderDry struct { Type SCTPNotificationType Flags uint16 Length uint32 AssocID int32 }
Click to show internal directories.
Click to hide internal directories.