Documentation ¶
Overview ¶
Package protocol contains the structures describing request and response for protocol request (see XRootD specification).
A response consists of 3 parts:
1) A general response that is always returned and specifies protocol version and flags describing server type.
2) A response part that is added to the general response if `ReturnSecurityRequirements` is provided and server supports it. It contains the security version, the security options, the security level, and the number of following security overrides, if any.
3) A list of SecurityOverride - alterations needed to the specified predefined security level.
Index ¶
- Constants
- type Flags
- type Request
- type RequestOptions
- type Response
- func (resp *Response) ForceSecurity() bool
- func (resp *Response) IsManager() bool
- func (resp *Response) IsMeta() bool
- func (resp *Response) IsProxy() bool
- func (resp *Response) IsServer() bool
- func (resp *Response) IsSupervisor() bool
- func (o Response) MarshalXrd(wBuffer *xrdenc.WBuffer) error
- func (resp *Response) RespID() uint16
- func (o *Response) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error
- type SecurityOptions
Constants ¶
const RequestID uint16 = 3006
RequestID is the id of the request, it is sent as part of message. See xrootd protocol specification for details: http://xrootd.org/doc/dev45/XRdv310.pdf, 2.3 Client Request Format.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flags ¶
type Flags int32
Flags are the Flags that define xrootd server type. See xrootd protocol specification for further info.
const ( IsServer Flags = 0x00000001 // IsServer indicates whether this server has server role. IsManager Flags = 0x00000002 // IsManager indicates whether this server has manager role. IsMeta Flags = 0x00000100 // IsMeta indicates whether this server has meta attribute. IsProxy Flags = 0x00000200 // IsProxy indicates whether this server has proxy attribute. IsSupervisor Flags = 0x00000400 // IsSupervisor indicates whether this server has supervisor attribute. )
type Request ¶
type Request struct { ClientProtocolVersion int32 Options RequestOptions // contains filtered or unexported fields }
Request holds protocol request parameters.
func NewRequest ¶
NewRequest forms a Request according to provided parameters.
func (Request) MarshalXrd ¶
MarshalXrd implements xrdproto.Marshaler.
func (*Request) ShouldSign ¶
ShouldSign implements xrdproto.Request.ShouldSign.
type RequestOptions ¶
type RequestOptions byte
RequestOptions specifies what should be returned as part of response.
const ( // RequestOptionsNone specifies that only general response should be returned. RequestOptionsNone RequestOptions = 0 // ReturnSecurityRequirements specifies that security requirements should be returned // if that's supported by the server. ReturnSecurityRequirements RequestOptions = 1 )
type Response ¶
type Response struct { BinaryProtocolVersion int32 Flags Flags HasSecurityInfo bool SecurityVersion byte SecurityOptions SecurityOptions SecurityLevel xrdproto.SecurityLevel SecurityOverrides []xrdproto.SecurityOverride // contains filtered or unexported fields }
Response is a response for the `Protocol` request. See details in the xrootd protocol specification.
func (*Response) ForceSecurity ¶
ForceSecurity indicates whether signing is required even if the authentication protocol does not support generic encryption.
func (*Response) IsSupervisor ¶
IsSupervisor indicates whether this server has supervisor attribute.
func (Response) MarshalXrd ¶
MarshalXrd implements xrdproto.Marshaler.
type SecurityOptions ¶
type SecurityOptions byte
SecurityOptions are the security-related options. See specification for details: http://xrootd.org/doc/dev45/XRdv310.pdf, p. 72.
const ( // ForceSecurity specifies that signing is required even if the authentication // protocol does not support generic encryption. ForceSecurity SecurityOptions = 0x02 )