hep: go-hep.org/x/hep/xrootd/xrdproto/protocol Index | Files

package protocol

import "go-hep.org/x/hep/xrootd/xrdproto/protocol"

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

Package Files

protocol.go

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.

type Flags Uses

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 Uses

type Request struct {
    ClientProtocolVersion int32
    Options               RequestOptions
    // contains filtered or unexported fields
}

Request holds protocol request parameters.

func NewRequest Uses

func NewRequest(protocolVersion int32, withSecurityRequirements bool) *Request

NewRequest forms a Request according to provided parameters.

func (Request) MarshalXrd Uses

func (o Request) MarshalXrd(wBuffer *xrdenc.WBuffer) error

MarshalXrd implements xrdproto.Marshaler.

func (*Request) ReqID Uses

func (req *Request) ReqID() uint16

ReqID implements xrdproto.Request.ReqID.

func (*Request) ShouldSign Uses

func (req *Request) ShouldSign() bool

ShouldSign implements xrdproto.Request.ShouldSign.

func (*Request) UnmarshalXrd Uses

func (o *Request) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

UnmarshalXrd implements xrdproto.Unmarshaler.

type RequestOptions Uses

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 Uses

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 Uses

func (resp *Response) ForceSecurity() bool

ForceSecurity indicates whether signing is required even if the authentication protocol does not support generic encryption.

func (*Response) IsManager Uses

func (resp *Response) IsManager() bool

IsManager indicates whether this server has manager role.

func (*Response) IsMeta Uses

func (resp *Response) IsMeta() bool

IsMeta indicates whether this server has meta attribute.

func (*Response) IsProxy Uses

func (resp *Response) IsProxy() bool

IsProxy indicates whether this server has proxy attribute.

func (*Response) IsServer Uses

func (resp *Response) IsServer() bool

IsServer indicates whether this server has server role.

func (*Response) IsSupervisor Uses

func (resp *Response) IsSupervisor() bool

IsSupervisor indicates whether this server has supervisor attribute.

func (Response) MarshalXrd Uses

func (o Response) MarshalXrd(wBuffer *xrdenc.WBuffer) error

MarshalXrd implements xrdproto.Marshaler.

func (*Response) RespID Uses

func (resp *Response) RespID() uint16

RespID implements xrdproto.Response.RespID.

func (*Response) UnmarshalXrd Uses

func (o *Response) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

UnmarshalXrd implements xrdproto.Unmarshaler.

type SecurityOptions Uses

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
)

Package protocol imports 2 packages (graph) and is imported by 1 packages. Updated 2019-05-31. Refresh now. Tools for package owners.