Documentation ¶
Index ¶
- type EapCode
- type EapIdentity
- type EapPacket
- func (packet *EapPacket) Decode(buff []byte) bool
- func (p *EapPacket) Dispatcher()
- func (packet *EapPacket) Encode() (bool, []byte)
- func (packet *EapPacket) GetCode() EapCode
- func (packet *EapPacket) GetId() uint8
- func (packet *EapPacket) GetLength() uint16
- func (packet *EapPacket) GetPayload() *EapPayload
- func (packet *EapPacket) GetType() EapType
- func (packet *EapPacket) SetCode(code EapCode)
- func (packet *EapPacket) SetId(id uint8)
- func (packet *EapPacket) SetPayload(p *EapPayload)
- type EapPayload
- type EapType
- type PacketFlag
- type PacketHeader
- type TLSClient
- func (client *TLSClient) MakeEapIdentity(id uint8, identity string) []byte
- func (client *TLSClient) MakeTLSHello(id uint8) []byte
- func (client *TLSClient) SendClientCertificate(id uint8, l int) ([]byte, bool)
- func (client *TLSClient) SendPendingBuffer(id uint8, l int) ([]byte, bool)
- func (client *TLSClient) SendTLSEmpty() []byte
- func (client *TLSClient) SendTLSHello(id uint8) []byte
- func (t *TLSClient) WriteHand(b []byte)
- type TLSPacket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EapIdentity ¶
type EapIdentity struct {
// contains filtered or unexported fields
}
func NewEapIdentity ¶
func NewEapIdentity() *EapIdentity
func (*EapIdentity) Decode ¶
func (packet *EapIdentity) Decode(buff []byte) bool
func (*EapIdentity) Encode ¶
func (packet *EapIdentity) Encode() (bool, []byte)
func (*EapIdentity) GetIdentity ¶
func (packet *EapIdentity) GetIdentity() string
func (*EapIdentity) SetIdentity ¶
func (packet *EapIdentity) SetIdentity(value string)
func (*EapIdentity) String ¶
func (packet *EapIdentity) String() string
type EapPacket ¶
type EapPacket struct { Payload EapPayload // contains filtered or unexported fields }
func (*EapPacket) Decode ¶
This function decodes from a given slice with raw data the attributes that belongs to the EAP header (code, identifier, length, type).
func (*EapPacket) Dispatcher ¶
func (p *EapPacket) Dispatcher()
func (*EapPacket) Encode ¶
This function encodes the attributes of the header of an EAP message (code, id, length, type) and returns the encoded result in a slice. 1º retval: If success encoding, return true, else false. 2º retval: The encoded slice.
func (*EapPacket) GetPayload ¶
func (packet *EapPacket) GetPayload() *EapPayload
func (*EapPacket) SetPayload ¶
func (packet *EapPacket) SetPayload(p *EapPayload)
type EapPayload ¶
Interface that defines the functions common to any type of EAP message. Every EAP method should implement this interface.
func GetEapPayload ¶
func GetEapPayload(msgType EapType) EapPayload
type PacketFlag ¶
type PacketFlag byte
const ( FlagLength PacketFlag = 1 << 7 FlagMore PacketFlag = 1 << 6 FlagStart PacketFlag = 1 << 5 FlagNone PacketFlag = 0 FlagLengthMore PacketFlag = 0xc0 )
type PacketHeader ¶
type PacketHeader struct { Flags PacketFlag Length uint32 }
func (*PacketHeader) Decode ¶
func (h *PacketHeader) Decode(buf []byte) bool
func (*PacketHeader) Encode ¶
func (h *PacketHeader) Encode(dataLen int) []byte
func (*PacketHeader) EncodedLen ¶
func (h *PacketHeader) EncodedLen() int
type TLSClient ¶
type TLSClient struct { Conn *tls.Conn Session *tls.ClientSessionState Hello *tls.ClientHelloMsg Buf []byte // contains filtered or unexported fields }
func GetTLSClient ¶
func (*TLSClient) MakeEapIdentity ¶
func (*TLSClient) MakeTLSHello ¶
func (*TLSClient) SendClientCertificate ¶
func (*TLSClient) SendPendingBuffer ¶
func (*TLSClient) SendTLSEmpty ¶
func (*TLSClient) SendTLSHello ¶
Click to show internal directories.
Click to hide internal directories.