Documentation ¶
Index ¶
- Constants
- func MD5Hash(text []byte) []byte
- type Client
- func (client *Client) Address() *net.UDPAddr
- func (client *Client) Cipher() *rc4.Cipher
- func (client *Client) ClientConnectionSignature() []byte
- func (client *Client) ConnectionID() uint32
- func (client *Client) Decipher() *rc4.Cipher
- func (client *Client) ExternalStationURL() string
- func (client *Client) FragmentedPayloadData() []byte
- func (client *Client) LastFragmentSequenceID() uint16
- func (client *Client) PlayerID() uint32
- func (client *Client) Reset()
- func (client *Client) SequenceIDCounterIn() *Counter
- func (client *Client) SequenceIDCounterOut() *Counter
- func (client *Client) Server() *Server
- func (client *Client) ServerConnectionSignature() []byte
- func (client *Client) SessionKey() []byte
- func (client *Client) SetClientConnectionSignature(clientConnectionSignature []byte)
- func (client *Client) SetConnectionID(connectionID uint32)
- func (client *Client) SetExternalStationURL(externalStationURL string)
- func (client *Client) SetFragmentedPayloadData(data []byte)
- func (client *Client) SetLastFragmentSequenceID(sequenceID uint16)
- func (client *Client) SetPlayerID(playerID uint32)
- func (client *Client) SetServerConnectionSignature(serverConnectionSignature []byte)
- func (client *Client) SetSessionKey(sessionKey []byte)
- func (client *Client) SignatureBase() int
- func (client *Client) SignatureKey() []byte
- func (client *Client) UpdateAccessKey(accessKey string)
- func (client *Client) UpdateRC4Key(RC4Key []byte)
- type Counter
- type DateTime
- type DummyCompression
- type KerberosEncryption
- type NullData
- type Packet
- func (packet *Packet) AddFlag(flag uint8)
- func (packet *Packet) ClearFlag(flag uint8)
- func (packet *Packet) ConnectionSignature() []byte
- func (packet *Packet) Data() []byte
- func (packet *Packet) Destination() uint8
- func (packet *Packet) Flags() uint8
- func (packet *Packet) FragmentID() uint8
- func (packet *Packet) HasFlag(flag uint8) bool
- func (packet *Packet) Payload() []byte
- func (packet *Packet) RMCRequest() RMCRequest
- func (packet *Packet) Sender() *Client
- func (packet *Packet) SequenceID() uint16
- func (packet *Packet) SessionID() uint8
- func (packet *Packet) SetConnectionSignature(connectionSignature []byte)
- func (packet *Packet) SetDestination(destination uint8)
- func (packet *Packet) SetFlags(bitmask uint8)
- func (packet *Packet) SetFragmentID(fragmentID uint8)
- func (packet *Packet) SetPayload(payload []byte)
- func (packet *Packet) SetSequenceID(sequenceID uint16)
- func (packet *Packet) SetSessionID(sessionID uint8)
- func (packet *Packet) SetSignature(signature []byte)
- func (packet *Packet) SetSource(source uint8)
- func (packet *Packet) SetType(packetType uint8)
- func (packet *Packet) SetVersion(version uint8)
- func (packet *Packet) Signature() []byte
- func (packet *Packet) Source() uint8
- func (packet *Packet) Type() uint8
- func (packet *Packet) Version() uint8
- type PacketInterface
- type PacketV0
- type RMCRequest
- func (request *RMCRequest) Bytes() []byte
- func (request *RMCRequest) CallID() uint32
- func (request *RMCRequest) MethodID() uint32
- func (request *RMCRequest) Parameters() []byte
- func (request *RMCRequest) ProtocolID() uint8
- func (request *RMCRequest) SetCallID(callID uint32)
- func (request *RMCRequest) SetMethodID(methodID uint32)
- func (request *RMCRequest) SetParameters(parameters []byte)
- func (request *RMCRequest) SetProtocolID(protocolID uint8)
- type RMCResponse
- type RVConnectionData
- func (rvConnectionData *RVConnectionData) Bytes(stream *StreamOut) []byte
- func (rvConnectionData *RVConnectionData) SetSpecialProtocols(specialProtocols []byte)
- func (rvConnectionData *RVConnectionData) SetStationURL(stationURL string)
- func (rvConnectionData *RVConnectionData) SetStationURLSpecialProtocols(stationURLSpecialProtocols string)
- func (rvConnectionData *RVConnectionData) SetTime(time uint64)
- type Server
- func (server *Server) AccessKey() string
- func (server *Server) AcknowledgePacket(packet PacketInterface, payload []byte)
- func (server *Server) ChecksumVersion() int
- func (server *Server) ClientConnected(client *Client) bool
- func (server *Server) ConnectionIDCounter() *Counter
- func (server *Server) Emit(event string, packet interface{})
- func (server *Server) FindClientFromConnectionID(rvcid uint32) *Client
- func (server *Server) FlagsVersion() int
- func (server *Server) FragmentSize() int16
- func (server *Server) KerberosKeySize() int
- func (server *Server) Kick(client *Client)
- func (server *Server) Listen(address string)
- func (server *Server) NexVersion() int
- func (server *Server) On(event string, handler interface{})
- func (server *Server) PrudpVersion() int
- func (server *Server) Send(packet PacketInterface)
- func (server *Server) SendFragment(packet PacketInterface, fragmentID uint8)
- func (server *Server) SendPing(client *Client)
- func (server *Server) SendRaw(conn *net.UDPAddr, data []byte)
- func (server *Server) SetAccessKey(accessKey string)
- func (server *Server) SetChecksumVersion(checksumVersion int)
- func (server *Server) SetFlagsVersion(flagsVersion int)
- func (server *Server) SetFragmentSize(fragmentSize int16)
- func (server *Server) SetKerberosKeySize(kerberosKeySize int)
- func (server *Server) SetNexVersion(nexVersion int)
- func (server *Server) SetPacketCompression(compression func([]byte) []byte)
- func (server *Server) SetPrudpVersion(prudpVersion int)
- func (server *Server) SetSignatureVersion(signatureVersion int)
- func (server *Server) SetSocket(socket *net.UDPConn)
- func (server *Server) SignatureVersion() int
- func (server *Server) Socket() *net.UDPConn
- func (server *Server) UsePacketCompression(usePacketCompression bool)
- type StationURL
- func (station *StationURL) Address() string
- func (station *StationURL) CID() string
- func (station *StationURL) EncodeToString() string
- func (station *StationURL) FromString(str string)
- func (station *StationURL) Natf() string
- func (station *StationURL) Natm() string
- func (station *StationURL) PID() string
- func (station *StationURL) PRID() string
- func (station *StationURL) Pmp() string
- func (station *StationURL) Port() string
- func (station *StationURL) ProbeInit() string
- func (station *StationURL) RVCID() string
- func (station *StationURL) SID() string
- func (station *StationURL) Scheme() string
- func (station *StationURL) SetAddress(address *string)
- func (station *StationURL) SetCID(cid *string)
- func (station *StationURL) SetNatf(natf *string)
- func (station *StationURL) SetNatm(natm *string)
- func (station *StationURL) SetPRID(prid *string)
- func (station *StationURL) SetPid(pid *string)
- func (station *StationURL) SetPmp(pmp *string)
- func (station *StationURL) SetPort(port *string)
- func (station *StationURL) SetProbeInit(probeinit *string)
- func (station *StationURL) SetRVCID(rvcid *string)
- func (station *StationURL) SetSID(sid *string)
- func (station *StationURL) SetScheme(scheme *string)
- func (station *StationURL) SetStream(stream *string)
- func (station *StationURL) SetType(transportType *string)
- func (station *StationURL) SetUpnp(upnp *string)
- func (station *StationURL) Stream() string
- func (station *StationURL) Type() string
- func (station *StationURL) Upnp() string
- type StreamIn
- func (stream *StreamIn) Read2ByteString() (string, error)
- func (stream *StreamIn) Read4ByteString() (string, error)
- func (stream *StreamIn) ReadBuffer() ([]byte, error)
- func (stream *StreamIn) ReadListUInt16LE() []uint16
- func (stream *StreamIn) ReadListUInt32LE() []uint32
- func (stream *StreamIn) ReadListUInt64LE() []uint64
- func (stream *StreamIn) ReadListUInt8() []uint8
- func (stream *StreamIn) ReadMap(keyFunction interface{}, valueFunction interface{}) (map[interface{}]interface{}, error)
- func (stream *StreamIn) ReadQBuffer() ([]byte, error)
- func (stream *StreamIn) ReadString() (string, error)
- func (stream *StreamIn) ReadStructure(structure StructureInterface) (StructureInterface, error)
- func (stream *StreamIn) ReadUInt16LE() uint16
- func (stream *StreamIn) ReadUInt24LE() uint32
- func (stream *StreamIn) ReadUInt32LE() uint32
- func (stream *StreamIn) ReadUInt64LE() uint64
- func (stream *StreamIn) ReadUInt8() uint8
- func (stream *StreamIn) ReadVariant() interface{}
- type StreamOut
- func (stream *StreamOut) WriteBuffer(data []byte)
- func (stream *StreamOut) WriteBufferString(str string)
- func (stream *StreamOut) WriteListStructure(structures interface{})
- func (stream *StreamOut) WriteListUInt16LE(list []uint16)
- func (stream *StreamOut) WriteListUInt32LE(list []uint32)
- func (stream *StreamOut) WriteListUInt64LE(list []uint64)
- func (stream *StreamOut) WriteListUInt8(list []uint8)
- func (stream *StreamOut) WriteString(str string)
- func (stream *StreamOut) WriteStructure(structure StructureInterface)
- func (stream *StreamOut) WriteUInt16LE(u16 uint16)
- func (stream *StreamOut) WriteUInt32LE(u32 uint32)
- func (stream *StreamOut) WriteUInt64LE(u64 uint64)
- func (stream *StreamOut) WriteUInt8(u8 uint8)
- type Structure
- type StructureInterface
- type Ticket
- type TicketData
- type TicketInfo
- type ZLibCompression
Constants ¶
const ( // FlagAck is the ID for the PRUDP Ack Flag FlagAck uint8 = 0x1 // FlagReliable is the ID for the PRUDP Reliable Flag FlagReliable uint8 = 0x2 // FlagNeedsAck is the ID for the PRUDP NeedsAck Flag FlagNeedsAck uint8 = 0x4 // FlagHasSize is the ID for the PRUDP HasSize Flag FlagHasSize uint8 = 0x8 )
const ( // SynPacket is the ID for the PRUDP Syn Packet type SynPacket uint8 = 0x0 // ConnectPacket is the ID for the PRUDP Connect Packet type ConnectPacket uint8 = 0x1 // DataPacket is the ID for the PRUDP Data Packet type DataPacket uint8 = 0x2 // DisconnectPacket is the ID for the PRUDP Disconnect Packet type DisconnectPacket uint8 = 0x3 // PingPacket is the ID for the PRUDP Ping Packet type PingPacket uint8 = 0x4 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { Username string // the platform username of the client, "Master User (FRIEND CODE)" on Wii WiiFC string // only used for Wii, Friend Code // contains filtered or unexported fields }
Client represents a connected or non-connected PRUDP client
func (*Client) ClientConnectionSignature ¶
ClientConnectionSignature returns the clients client-side connection signature
func (*Client) ConnectionID ¶
ConnectionID returns the clients Connection ID
func (*Client) ExternalStationURL ¶
SetExternalStationURL returns the clients external station URL
func (*Client) FragmentedPayloadData ¶
func (*Client) LastFragmentSequenceID ¶
func (*Client) SequenceIDCounterIn ¶
SequenceIDCounterIn returns the clients packet SequenceID counter for incoming packets
func (*Client) SequenceIDCounterOut ¶
SequenceIDCounterOut returns the clients packet SequenceID counter for out-going packets
func (*Client) ServerConnectionSignature ¶
ServerConnectionSignature returns the clients server-side connection signature
func (*Client) SessionKey ¶
SessionKey returns the clients session key
func (*Client) SetClientConnectionSignature ¶
SetClientConnectionSignature sets the clients client-side connection signature
func (*Client) SetConnectionID ¶
SetConnectionID sets the clients Connection ID
func (*Client) SetExternalStationURL ¶
SetExternalStationURL sets the clients external station URL
func (*Client) SetFragmentedPayloadData ¶
func (*Client) SetLastFragmentSequenceID ¶
func (*Client) SetPlayerID ¶
SetPlayerID sets the clients Player ID
func (*Client) SetServerConnectionSignature ¶
SetServerConnectionSignature sets the clients server-side connection signature
func (*Client) SetSessionKey ¶
SetSessionKey sets the clients session key
func (*Client) SignatureBase ¶
SignatureBase returns the v0 checksum signature base
func (*Client) SignatureKey ¶
SignatureKey returns signature key
func (*Client) UpdateAccessKey ¶
UpdateAccessKey sets the client signature base and signature key
func (*Client) UpdateRC4Key ¶
UpdateRC4Key sets the client RC4 stream key
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter represents an incremental counter
func NewCounter ¶
NewCounter returns a new Counter, with a starting number
type DateTime ¶
type DateTime struct {
// contains filtered or unexported fields
}
DateTime represents a NEX DateTime type
func NewDateTime ¶
NewDateTime returns a new DateTime instance
type DummyCompression ¶
type DummyCompression struct{}
DummyCompression represents no compression
func (*DummyCompression) Compress ¶
func (compression *DummyCompression) Compress(data []byte) []byte
Compress returns the data as-is
func (*DummyCompression) Decompress ¶
func (compression *DummyCompression) Decompress(data []byte) []byte
Decompress returns the data as-is
type KerberosEncryption ¶
type KerberosEncryption struct {
// contains filtered or unexported fields
}
KerberosEncryption is used to encrypt/decrypt using Kerberos
func NewKerberosEncryption ¶
func NewKerberosEncryption(key []byte) *KerberosEncryption
NewKerberosEncryption returns a new KerberosEncryption instance
func (*KerberosEncryption) Decrypt ¶
func (encryption *KerberosEncryption) Decrypt(buffer []byte) []byte
Decrypt will decrypt the given data using Kerberos
func (*KerberosEncryption) Encrypt ¶
func (encryption *KerberosEncryption) Encrypt(buffer []byte) []byte
Encrypt will encrypt the given data using Kerberos
func (*KerberosEncryption) Validate ¶
func (encryption *KerberosEncryption) Validate(buffer []byte) bool
Validate will check the HMAC of the encrypted data
type NullData ¶
type NullData struct {
*Structure
}
NullData represents a structure with no data
func (*NullData) ExtractFromStream ¶
ExtractFromStream does nothing for NullData
type Packet ¶
type Packet struct { PacketInterface // contains filtered or unexported fields }
Packet represents a generic PRUDP packet
func (*Packet) ConnectionSignature ¶
ConnectionSignature returns the packet connection signature
func (*Packet) Data ¶
Data returns bytes used to create the packet (this is not the same as Bytes())
func (*Packet) Destination ¶
Destination returns the packet destination
func (*Packet) FragmentID ¶
FragmentID returns the packet fragmentID
func (*Packet) RMCRequest ¶
func (packet *Packet) RMCRequest() RMCRequest
RMCRequest returns the packet RMC request
func (*Packet) SequenceID ¶
SequenceID returns the packet sequenceID
func (*Packet) SetConnectionSignature ¶
SetConnectionSignature sets the packet connection signature
func (*Packet) SetDestination ¶
SetDestination sets the packet destination
func (*Packet) SetFragmentID ¶
SetFragmentID sets the packet fragmentID
func (*Packet) SetPayload ¶
SetPayload sets the packet payload
func (*Packet) SetSequenceID ¶
SetSequenceID sets the packet sequenceID
func (*Packet) SetSessionID ¶
SetSessionID sets the packet sessionID
func (*Packet) SetSignature ¶
SetSignature sets the packet signature
func (*Packet) SetVersion ¶
SetVersion sets the packet PRUDP version
type PacketInterface ¶
type PacketInterface interface { Sender() *Client SetVersion(version uint8) Version() uint8 SetSource(source uint8) Source() uint8 SetDestination(destination uint8) Destination() uint8 SetType(packetType uint8) Type() uint8 SetFlags(bitmask uint8) Flags() uint8 HasFlag(flag uint8) bool AddFlag(flag uint8) ClearFlag(flag uint8) SetSessionID(sessionID uint8) SessionID() uint8 SetSignature(signature []byte) Signature() []byte SetSequenceID(sequenceID uint16) SequenceID() uint16 SetConnectionSignature(connectionSignature []byte) ConnectionSignature() []byte SetFragmentID(fragmentID uint8) FragmentID() uint8 SetPayload(payload []byte) Payload() []byte RMCRequest() RMCRequest Bytes() []byte }
PacketInterface implements all Packet methods
type PacketV0 ¶
type PacketV0 struct { Packet // contains filtered or unexported fields }
PacketV0 reresents a PRUDPv0 packet
func NewPacketV0 ¶
NewPacketV0 returns a new PRUDPv0 packet
func (*PacketV0) SetChecksum ¶
SetChecksum sets the packet checksum
type RMCRequest ¶
type RMCRequest struct {
// contains filtered or unexported fields
}
RMCRequest represets a RMC request
func NewRMCRequest ¶
func NewRMCRequest(data []byte) (RMCRequest, error)
NewRMCRequest returns a new parsed RMCRequest
func (*RMCRequest) Bytes ¶
func (request *RMCRequest) Bytes() []byte
Bytes converts a RMCRequest struct into a usable byte array
func (*RMCRequest) CallID ¶
func (request *RMCRequest) CallID() uint32
CallID sets the RMC request callID
func (*RMCRequest) MethodID ¶
func (request *RMCRequest) MethodID() uint32
MethodID sets the RMC request methodID
func (*RMCRequest) Parameters ¶
func (request *RMCRequest) Parameters() []byte
Parameters sets the RMC request parameters
func (*RMCRequest) ProtocolID ¶
func (request *RMCRequest) ProtocolID() uint8
ProtocolID sets the RMC request protocolID
func (*RMCRequest) SetCallID ¶
func (request *RMCRequest) SetCallID(callID uint32)
SetCallID sets the RMC request call ID
func (*RMCRequest) SetMethodID ¶
func (request *RMCRequest) SetMethodID(methodID uint32)
SetMethodID sets the RMC request method ID
func (*RMCRequest) SetParameters ¶
func (request *RMCRequest) SetParameters(parameters []byte)
SetParameters sets the RMC request parameters
func (*RMCRequest) SetProtocolID ¶
func (request *RMCRequest) SetProtocolID(protocolID uint8)
SetProtocolID sets the RMC request protocol ID
type RMCResponse ¶
type RMCResponse struct {
// contains filtered or unexported fields
}
RMCResponse represents a RMC response
func NewRMCResponse ¶
func NewRMCResponse(protocolID uint8, callID uint32) RMCResponse
NewRMCResponse returns a new RMCResponse
func (*RMCResponse) Bytes ¶
func (response *RMCResponse) Bytes() []byte
Bytes converts a RMCResponse struct into a usable byte array
func (*RMCResponse) SetError ¶
func (response *RMCResponse) SetError(errorCode uint32)
SetError sets the RMCResponse payload to an instance of RMCError
func (*RMCResponse) SetSuccess ¶
func (response *RMCResponse) SetSuccess(methodID uint32, data []byte)
SetSuccess sets the RMCResponse payload to an instance of RMCSuccess
type RVConnectionData ¶
type RVConnectionData struct { Structure // contains filtered or unexported fields }
RVConnectionData represents a nex RVConnectionData type
func NewRVConnectionData ¶
func NewRVConnectionData() *RVConnectionData
NewRVConnectionData returns a new RVConnectionData
func (*RVConnectionData) Bytes ¶
func (rvConnectionData *RVConnectionData) Bytes(stream *StreamOut) []byte
Bytes encodes the RVConnectionData and returns a byte array
func (*RVConnectionData) SetSpecialProtocols ¶
func (rvConnectionData *RVConnectionData) SetSpecialProtocols(specialProtocols []byte)
SetSpecialProtocols sets the RVConnectionData special protocol list (unused by Nintendo)
func (*RVConnectionData) SetStationURL ¶
func (rvConnectionData *RVConnectionData) SetStationURL(stationURL string)
SetStationURL sets the RVConnectionData station URL
func (*RVConnectionData) SetStationURLSpecialProtocols ¶
func (rvConnectionData *RVConnectionData) SetStationURLSpecialProtocols(stationURLSpecialProtocols string)
SetStationURLSpecialProtocols sets the RVConnectionData special station URL (unused by Nintendo)
func (*RVConnectionData) SetTime ¶
func (rvConnectionData *RVConnectionData) SetTime(time uint64)
SetTime sets the RVConnectionData time
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a PRUDP server
func (*Server) AcknowledgePacket ¶
func (server *Server) AcknowledgePacket(packet PacketInterface, payload []byte)
AcknowledgePacket acknowledges that the given packet was recieved
func (*Server) ChecksumVersion ¶
ChecksumVersion returns the server packet checksum version
func (*Server) ClientConnected ¶
ClientConnected checks if a given client is stored on the server
func (*Server) ConnectionIDCounter ¶
ConnectionIDCounter gets the server connection ID counter
func (*Server) FindClientFromConnectionID ¶
FindClientFromConnectionID finds a client by their Connection ID
func (*Server) FlagsVersion ¶
FlagsVersion returns the server packet flags version
func (*Server) FragmentSize ¶
KerberosKeySize returns the server kerberos key size
func (*Server) KerberosKeySize ¶
KerberosKeySize returns the server kerberos key size
func (*Server) NexVersion ¶
NexVersion returns the server NEX version
func (*Server) PrudpVersion ¶
PrudpVersion returns the server PRUDP version
func (*Server) SendFragment ¶
func (server *Server) SendFragment(packet PacketInterface, fragmentID uint8)
SendFragment sends a packet fragment to the client
func (*Server) SetAccessKey ¶
SetAccessKey sets the server access key
func (*Server) SetChecksumVersion ¶
SetChecksumVersion sets the server packet checksum version
func (*Server) SetFlagsVersion ¶
SetFlagsVersion sets the server packet flags version
func (*Server) SetFragmentSize ¶
SetKerberosKeySize sets the server kerberos key size
func (*Server) SetKerberosKeySize ¶
SetKerberosKeySize sets the server kerberos key size
func (*Server) SetNexVersion ¶
SetNexVersion sets the server NEX version
func (*Server) SetPacketCompression ¶
SetPacketCompression sets the packet compression function
func (*Server) SetPrudpVersion ¶
SetPrudpVersion sets the server PRUDP version
func (*Server) SetSignatureVersion ¶
SetSignatureVersion sets the server packet signature version
func (*Server) SignatureVersion ¶
SignatureVersion returns the server packet signature version
func (*Server) UsePacketCompression ¶
UsePacketCompression enables or disables packet compression
type StationURL ¶
type StationURL struct {
// contains filtered or unexported fields
}
StationURL contains the data for a NEX station URL
func NewStationURL ¶
func NewStationURL(str string) *StationURL
NewStationURL returns a new StationURL instance
func (*StationURL) Address ¶
func (station *StationURL) Address() string
func (*StationURL) CID ¶
func (station *StationURL) CID() string
func (*StationURL) EncodeToString ¶
func (station *StationURL) EncodeToString() string
EncodeToString encodes the StationURL into a string
func (*StationURL) FromString ¶
func (station *StationURL) FromString(str string)
FromString parses the StationURL data from a string
func (*StationURL) Natf ¶
func (station *StationURL) Natf() string
func (*StationURL) Natm ¶
func (station *StationURL) Natm() string
func (*StationURL) PID ¶
func (station *StationURL) PID() string
func (*StationURL) PRID ¶
func (station *StationURL) PRID() string
func (*StationURL) Pmp ¶
func (station *StationURL) Pmp() string
func (*StationURL) Port ¶
func (station *StationURL) Port() string
func (*StationURL) ProbeInit ¶
func (station *StationURL) ProbeInit() string
func (*StationURL) RVCID ¶
func (station *StationURL) RVCID() string
func (*StationURL) SID ¶
func (station *StationURL) SID() string
func (*StationURL) Scheme ¶
func (station *StationURL) Scheme() string
func (*StationURL) SetAddress ¶
func (station *StationURL) SetAddress(address *string)
SetAddress sets the StationURL address
func (*StationURL) SetCID ¶
func (station *StationURL) SetCID(cid *string)
SetCID sets the StationURL CID
func (*StationURL) SetNatf ¶
func (station *StationURL) SetNatf(natf *string)
SetNatf sets the StationURL Natf
func (*StationURL) SetNatm ¶
func (station *StationURL) SetNatm(natm *string)
SetNatm sets the StationURL Natm
func (*StationURL) SetPRID ¶
func (station *StationURL) SetPRID(prid *string)
SetPRID sets the StationURL PRID
func (*StationURL) SetPid ¶
func (station *StationURL) SetPid(pid *string)
SetPid sets the StationURL PID
func (*StationURL) SetPmp ¶
func (station *StationURL) SetPmp(pmp *string)
SetPmp sets the StationURL Pmp
func (*StationURL) SetPort ¶
func (station *StationURL) SetPort(port *string)
SetPort sets the StationURL port
func (*StationURL) SetProbeInit ¶
func (station *StationURL) SetProbeInit(probeinit *string)
SetProbeInit sets the StationURL ProbeInit
func (*StationURL) SetRVCID ¶
func (station *StationURL) SetRVCID(rvcid *string)
SetRVCID sets the StationURL RVCID
func (*StationURL) SetSID ¶
func (station *StationURL) SetSID(sid *string)
SetSID sets the StationURL SID
func (*StationURL) SetScheme ¶
func (station *StationURL) SetScheme(scheme *string)
SetScheme sets the StationURL scheme
func (*StationURL) SetStream ¶
func (station *StationURL) SetStream(stream *string)
SetStream sets the StationURL stream
func (*StationURL) SetType ¶
func (station *StationURL) SetType(transportType *string)
SetType sets the StationURL transportType
func (*StationURL) SetUpnp ¶
func (station *StationURL) SetUpnp(upnp *string)
SetUpnp sets the StationURL Upnp
func (*StationURL) Stream ¶
func (station *StationURL) Stream() string
func (*StationURL) Type ¶
func (station *StationURL) Type() string
func (*StationURL) Upnp ¶
func (station *StationURL) Upnp() string
type StreamIn ¶
StreamIn is an input stream abstraction of github.com/superwhiskers/crunch with nex type support
func NewStreamIn ¶
NewStreamIn returns a new NEX input stream
func (*StreamIn) Read2ByteString ¶
func (*StreamIn) Read4ByteString ¶
ReadString reads and returns a u32 length nex string type
func (*StreamIn) ReadBuffer ¶
ReadBuffer reads a nex Buffer type
func (*StreamIn) ReadListUInt16LE ¶
ReadListUInt16LE reads a list of uint16 types
func (*StreamIn) ReadListUInt32LE ¶
ReadListUInt32LE reads a list of uint32 types
func (*StreamIn) ReadListUInt64LE ¶
ReadListUInt64LE reads a list of uint64 types
func (*StreamIn) ReadListUInt8 ¶
ReadListUInt8 reads a list of uint8 types
func (*StreamIn) ReadMap ¶
func (stream *StreamIn) ReadMap(keyFunction interface{}, valueFunction interface{}) (map[interface{}]interface{}, error)
ReadMap reads a Map type with the given key and value types
func (*StreamIn) ReadQBuffer ¶
ReadQBuffer reads a nex qBuffer type
func (*StreamIn) ReadString ¶
ReadString reads and returns a nex string type ReadString reads and returns a nex string type
func (*StreamIn) ReadStructure ¶
func (stream *StreamIn) ReadStructure(structure StructureInterface) (StructureInterface, error)
ReadStructure reads a nex Structure type
func (*StreamIn) ReadUInt16LE ¶
ReadUInt16LE reads a uint16
func (*StreamIn) ReadUInt24LE ¶
ReadUInt24LE reads a uint32
func (*StreamIn) ReadUInt32LE ¶
ReadUInt32LE reads a uint32
func (*StreamIn) ReadUInt64LE ¶
ReadUInt64LE reads a uint64
func (*StreamIn) ReadVariant ¶
func (stream *StreamIn) ReadVariant() interface{}
ReadVariant reads a Variant type. This type can hold 7 different types
type StreamOut ¶
StreamOut is an abstraction of github.com/superwhiskers/crunch with nex type support
func NewStreamOut ¶
NewStreamOut returns a new nex output stream
func (*StreamOut) WriteBuffer ¶
WriteBuffer writes a NEX Buffer type
func (*StreamOut) WriteBufferString ¶
func (*StreamOut) WriteListStructure ¶
func (stream *StreamOut) WriteListStructure(structures interface{})
WriteListStructure writes a list of Structure types
func (*StreamOut) WriteListUInt16LE ¶
WriteListUInt16LE writes a list of uint16 types
func (*StreamOut) WriteListUInt32LE ¶
WriteListUInt32LE writes a list of uint32 types
func (*StreamOut) WriteListUInt64LE ¶
WriteListUInt64LE writes a list of uint64 types
func (*StreamOut) WriteListUInt8 ¶
WriteListUInt8 writes a list of uint8 types
func (*StreamOut) WriteString ¶
WriteString writes a NEX string type
func (*StreamOut) WriteStructure ¶
func (stream *StreamOut) WriteStructure(structure StructureInterface)
WriteStructure writes a nex Structure type
func (*StreamOut) WriteUInt16LE ¶
WriteUInt16LE writes a uint16 as LE
func (*StreamOut) WriteUInt32LE ¶
WriteUInt32LE writes a uint32 as LE
func (*StreamOut) WriteUInt64LE ¶
WriteUInt64LE writes a uint64 as LE
func (*StreamOut) WriteUInt8 ¶
WriteUInt8 writes a uint8
type Structure ¶
type Structure struct {
StructureInterface
}
Structure represents a nex Structure type
func (*Structure) Hierarchy ¶
func (structure *Structure) Hierarchy() []StructureInterface
Hierarchy returns a Structure hierarchy
type StructureInterface ¶
type StructureInterface interface { Hierarchy() []StructureInterface ExtractFromStream(*StreamIn) error Bytes(*StreamOut) []byte }
StructureInterface implements all Structure methods
type Ticket ¶
type Ticket struct {
// contains filtered or unexported fields
}
Ticket represents a Kerberos authentication ticket
type TicketData ¶
type TicketData struct {
// contains filtered or unexported fields
}
TicketData contains the encrypted ticket info and an optional key used for deriving the encryption key for TicketInfo
type TicketInfo ¶
type TicketInfo struct {
// contains filtered or unexported fields
}
TicketInfo contains the actual data of the ticket
type ZLibCompression ¶
type ZLibCompression struct{}
ZLibCompression represents ZLib compression
func (*ZLibCompression) Compress ¶
func (compression *ZLibCompression) Compress(data []byte) []byte
Compress returns the data as-is (needs to be updated to return ZLib compressed data)
func (*ZLibCompression) Decompress ¶
func (compression *ZLibCompression) Decompress(data []byte) []byte
Decompress returns the data as-is (needs to be updated to return ZLib decompressed data)