Documentation ¶
Index ¶
- Constants
- type AlterContextReq
- type Auth3Req
- type AuthLevel
- type AuthVerifier
- type BindAckResp
- type BindReq
- type CommonHead
- type ContextID
- type ErrorStatus
- type FaultResp
- type NegRejectReason
- type NegResult
- type PContextElem
- type PContextList
- type PFCFlags
- type PResult
- type PResultList
- type PSyntaxID
- type P_rt_versions_supported_t
- type PortAny
- type RPC_IF_ID
- type RequestReq
- type Response
- type SecurityProviders
- type Twr_t
- type Version
- type Version_t
Constants ¶
View Source
const ( RPC_C_AUTHN_NONE = SecurityProviders(0) RPC_C_AUTHN_GSS_NEGOTIATE = SecurityProviders(0x09) //SPNEGO RPC_C_AUTHN_WINNT = SecurityProviders(0x0a) //NTLM RPC_C_AUTHN_GSS_SCHANNEL = SecurityProviders(0x0e) //TLS RPC_C_AUTHN_GSS_KERBEROS = SecurityProviders(0x10) //Kerberos RPC_C_AUTHN_NETLOGON = SecurityProviders(0x44) RPC_C_AUTHN_DEFAULT = SecurityProviders(0xff) )
View Source
const (
AccessDenied uint32 = 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlterContextReq ¶
type AlterContextReq struct { CommonHead CommonHead MaxXmitFrag uint16 MaxRecvFrag uint16 AssocGroup uint32 PresentationContextList *PContextList AuthVerifier *AuthVerifier //Optional }
func NewAlterContextReq ¶
func NewAlterContextReq(callID, assgroup uint32, ctxList *PContextList, auth *AuthVerifier) AlterContextReq
func (AlterContextReq) Bytes ¶
func (b AlterContextReq) Bytes() []byte
type Auth3Req ¶
type Auth3Req struct { CommonHead CommonHead Pad [4]byte SecTrailer AuthVerifier }
type AuthLevel ¶
type AuthLevel uint8
const ( RPC_C_AUTHN_LEVEL_DEFAULT AuthLevel = iota //0x00 Same as RPC_C_AUTHN_LEVEL_CONNECT RPC_C_AUTHN_LEVEL_NONE // 0x01 No authentication. RPC_C_AUTHN_LEVEL_CONNECT // 0x02 Authenticates the credentials of the client and server. RPC_C_AUTHN_LEVEL_CALL //0x03 Same as RPC_C_AUTHN_LEVEL_PKT. RPC_C_AUTHN_LEVEL_PKT //0x04 Same as RPC_C_AUTHN_LEVEL_CONNECT but also prevents replay attacks. RPC_C_AUTHN_LEVEL_PKT_INTEGRITY //0x05 Same as RPC_C_AUTHN_LEVEL_PKT but also verifies that none of the data transferred between the client and server has been modified. RPC_C_AUTHN_LEVEL_PKT_PRIVACY // 0x06 Same as RPC_C_AUTHN_LEVEL_PKT_INTEGRITY but also ensures that the data transferred can only be )
type AuthVerifier ¶
type AuthVerifier struct { Align []byte // must be 4-byte aligned!! AuthType SecurityProviders AuthLevel AuthLevel AuthPadLength byte Reserved byte ContextID uint32 AuthValue []byte }
func NewAuthVerifier ¶
func NewAuthVerifier(authType SecurityProviders, authLevel AuthLevel, contextID uint32, value []byte) AuthVerifier
func (AuthVerifier) Bytes ¶
func (a AuthVerifier) Bytes() []byte
func (AuthVerifier) SizeOf ¶
func (a AuthVerifier) SizeOf() int
func (*AuthVerifier) UpdatePadding ¶
func (a *AuthVerifier) UpdatePadding(v int)
func (AuthVerifier) ValueSize ¶
func (a AuthVerifier) ValueSize() int
type BindAckResp ¶
type BindAckResp struct { CommonHead CommonHead MaxXmitFrag uint16 MaxRecvFrag uint16 AssocGroupID uint32 SecAddr PortAny Pad2 []byte //idk what happened to pad1 ? PResultList PResultList AuthVerifier AuthVerifier }
func ParseBindAck ¶
func ParseBindAck(b []byte) BindAckResp
type BindReq ¶
type BindReq struct { CommonHead CommonHead MaxXmitFrag uint16 MaxRecvFrag uint16 AssocGroupID uint32 PresentationContextList *PContextList AuthVerifier *AuthVerifier //Optional }
func NewBindReq ¶
func NewBindReq(callID uint32, ctxList *PContextList, auth *AuthVerifier) BindReq
type CommonHead ¶
type CommonHead struct { Version byte // 00:01 =5. RPC Version VersionMinor byte PacketType byte PFCFlags PFCFlags DataRepresentation [4]byte FragLength uint16 AuthLength uint16 CallID uint32 }
CommonHead appears in all PDU types. Alignment etc in comments. (page 590)
func NewCommonHeader ¶
func NewCommonHeader(ptype byte, flags PFCFlags, callID uint32) CommonHead
type ErrorStatus ¶
type ErrorStatus uint32
type FaultResp ¶
type FaultResp struct { CommonHead CommonHead AllocHint uint32 PcontID uint16 CancelCount byte Reserved byte Status uint32 Reserved2 [4]byte StubData []byte AuthVerifier AuthVerifier }
func ParseFault ¶
func (FaultResp) StatusString ¶
type NegRejectReason ¶
type NegRejectReason short
const ( NegRejectNotSpecified NegRejectReason = iota NegRejectAbSyntaxNotSpecified NegRejectProposedTransferSyntaxNotSupported NegRejectLocalLimitExceeded )
type PContextElem ¶
type PContextElem struct { ContextID uint16 // unclear if this should be 0 indexed per context? NumTransItems byte Unkown2 byte AbSyntax PSyntaxID TfSyntax []PSyntaxID //supposedly this can hold more than 1? }
func NewPcontextElem ¶
func NewPcontextElem(id uint16, abSyntax PSyntaxID, tfSyntax []PSyntaxID) PContextElem
func (PContextElem) Bytes ¶
func (p PContextElem) Bytes() []byte
type PContextList ¶
type PContextList struct { NumContexts byte Reserved byte Reserved2 uint16 PContextElems []PContextElem }
func NewPcontextList ¶
func NewPcontextList() *PContextList
func (*PContextList) AddContext ¶
func (p *PContextList) AddContext(c PContextElem)
func (PContextList) Bytes ¶
func (p PContextList) Bytes() []byte
func (PContextList) SizeOf ¶
func (p PContextList) SizeOf() int
SizeOf returns the total size in bytes of the Pcontextlist to be put on the wire
type PResult ¶
type PResult struct { NegResult NegResult NegRejectReason NegRejectReason TransferSyntax PSyntaxID //should be 0's if result not accepted }
type PResultList ¶
type RequestReq ¶
type RequestReq struct { CommonHead CommonHead AllocHint uint32 PContextID uint16 Opnum uint16 StubData []byte AuthVerifier *AuthVerifier }
func NewRequestReq ¶
func NewRequestReq(callID uint32, ctxID uint16, opNum uint16, data []byte, auth *AuthVerifier) RequestReq
func (RequestReq) AuthBytes ¶
func (r RequestReq) AuthBytes() []byte
func (RequestReq) Bytes ¶
func (r RequestReq) Bytes() []byte
func (*RequestReq) UpdateLengths ¶
func (r *RequestReq) UpdateLengths()
UpdateLengths sets the commonheader.fraglength and .authlength values based on the current state of the object.
type Response ¶
type Response struct { CommonHead CommonHead AllocHint uint32 PContID uint16 CancelCount byte Reserved byte StubData []byte AuthVerifier *AuthVerifier }
func ParseResponse ¶
type SecurityProviders ¶
type SecurityProviders byte
Click to show internal directories.
Click to hide internal directories.