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

    View Source
    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

          func NewRequest(protocolVersion int32, withSecurityRequirements bool) *Request

            NewRequest forms a Request according to provided parameters.

            func (Request) MarshalXrd

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

              MarshalXrd implements xrdproto.Marshaler.

              func (*Request) ReqID

              func (req *Request) ReqID() uint16

                ReqID implements xrdproto.Request.ReqID.

                func (*Request) ShouldSign

                func (req *Request) ShouldSign() bool

                  ShouldSign implements xrdproto.Request.ShouldSign.

                  func (*Request) UnmarshalXrd

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

                    UnmarshalXrd implements xrdproto.Unmarshaler.

                    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

                        func (resp *Response) ForceSecurity() bool

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

                          func (*Response) IsManager

                          func (resp *Response) IsManager() bool

                            IsManager indicates whether this server has manager role.

                            func (*Response) IsMeta

                            func (resp *Response) IsMeta() bool

                              IsMeta indicates whether this server has meta attribute.

                              func (*Response) IsProxy

                              func (resp *Response) IsProxy() bool

                                IsProxy indicates whether this server has proxy attribute.

                                func (*Response) IsServer

                                func (resp *Response) IsServer() bool

                                  IsServer indicates whether this server has server role.

                                  func (*Response) IsSupervisor

                                  func (resp *Response) IsSupervisor() bool

                                    IsSupervisor indicates whether this server has supervisor attribute.

                                    func (Response) MarshalXrd

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

                                      MarshalXrd implements xrdproto.Marshaler.

                                      func (*Response) RespID

                                      func (resp *Response) RespID() uint16

                                        RespID implements xrdproto.Response.RespID.

                                        func (*Response) UnmarshalXrd

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

                                          UnmarshalXrd implements xrdproto.Unmarshaler.

                                          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
                                            )

                                            Source Files