OverviewNewsDownloadDocumentationDeveloper toolsContributeContact
Imagen izquierda
You are in: Serval > WebDocumentation > DeveloperDocumentation > ServalCommunicationsProtocol Edit - Attach

SERVAL communications protocol

ASN.1 specification

We have designed a protocol to communicate the client with the server and we chose ASN.1 (Abstract system notation 1) as the way to code and interchange the Serval messages.

The ASN.1 standard is an abstract notation to specify data types and it defines the way to convert these data types to a stream of bytes to send through a computer network. The ASN.1 is both CPU architecture and programming language independent. So, on specifying the SERVAL protocol in ASN.1, a client in any programming language might be implemented.

In both the SERVAL server and client is used the ASN.1 Erlang compiler to code and decode the communication messages.

Protocol description

The messages which make up the SERVAL communication protocol are the following:

connectionRequest

The connectionRequest message is used to ask SERVAL to accept the connection from a client. The fields of the message are:

connectionRequest ConnectionRequestType

ConnectionRequestType can have two values:

  • startTLS MOVED TO... It requests to start an encrypted connection.
  • notStartTLS MOVED TO... It request to start a clear connection.

responseDataConnectionResponse

The responseDataConnectionResponse message is the answer of the SERVAL server to a connectionRequest message.

(A)

responseDataConnectionResponse UserName MacAddress ServerList

(B)

responseDataConnectionResponse MacAddress ServerList AuthenticationOptions

  • UserName MOVED TO... It is the login of the user the client has been authenticated with.
  • MacAddress MOVED TO... It the MAC address by the server to the virtual network interface of the client.
  • ServerList MOVED TO... It is the list of nodes the SERVAL server has. The information provided for each node is the machine DNS name and the port numbers for the udp, tcp and ssl connections.
  • AuthenticationOptions MOVED TO... Here the authentication options are showed.

errorConnectionRequestCode

This message is sent by the SERVAL server if a connectionRequest message is received and an error happens.

errorConnectionRequestCode ErrorCode

ErrorCode can have be: unknownError, noFreeMac and systemNotAvailable

authenticatePlainRequest

It is used to open an authentication process using the plain method. The format of the message is:

authenticatePlainRequest Login Password

  • Login MOVED TO... User identifier.
  • Password MOVED TO... Watchword to authenticate.

authenticatePlainResponse

This is the answer sent by the SERVAL server of a previous authenticateRequest message. The format of the message is:

(A)

authenticatePlainResponse Login

(B)

authenticationPlainResponse Login ErrorCode

  • Login MOVED TO... User identifier who requested the authentication process.
  • ErrorCode MOVED TO... If the authentication is not successful then an ErrorCode is sent back.

sendUnicastSourceToServer

This message is used to send data from a client to another. The format of the message:

sendUnicastSourceToServer DestinationAddress MessageData

  • DestinationAddress MOVED TO... It is the MAC address of the destination client.
  • MessageData MOVED TO... It is the data to deliver to the destination.

sendBroadcastSourceToServer

With this message the data is delivered by the SERVAL server to all the clients belonging to the VLANs the client sending the message belongs.

sendBroadcastSourceToServer MessageData

  • MessageData MOVED TO... It is the data to deliver to the destination.

sendMessageServerToDestination

This message is sent by the server to deliver data to clients. It can be caused by the arrival to SERVAL of a sendUnicastSourceToServer or a sendBroadcastSourceToServer.

sendMessageServerToDestination MessageData

  • MessageData MOVED TO... It is the data to deliver to the destination.

joinVlanRequest

It is used to join the client to an existing VLAN.

joinVlanRequest VlanId

  • VlanId MOVED TO... It is the identifier of the VLAN the client is going to join to.

joinVlanResponse

It is the response emitted by the SERVAL server on receiving a joinVlanRequest.

(A)

joinVlanResponse VlanId

(B)

joinVlanResponse VlanId ErroCode

  • VlanId MOVED TO... The name of the VLAN this answer corresponds with.
  • ErrorCode MOVED TO... At the moment, notInAccessGroup, notExistingVlan and alreadyJoinedVlan are the three types or erros can be handled.

createVlanRequest

This message is to create VLANS in SERVAL.

(A)

createVlanRequest VlanId Description

(B)

createVlanRequest VlanId Description ListGroups

  • VlanId MOVED TO... Name of the VLAN to create.
  • Description MOVED TO... Some words explaining the porpuse of the VLAN.
  • ListGroups MOVED TO... User groups with access permission to join the VLAN.

vlanListRequest

With this message the user can ask the list of VLANs created in the server.

vlanListRequest

vlansListResponse

With vlansListResponse the SERVAL server communicates the list of VLANS created in the server.

vlansListResponse ListofVlans

leaveVlanRequest

This message is to request to abandon a VLAN.

leaveVlanRequest VlanName

  • VlanName MOVED TO... It is the identifier of the VLAN to create.

leaveVlanResponse

It is the answer the server gives to a leaveVlanRequest message.

(A)

leaveVlanRequest VlanName

(B)

leaveVlanRequest VlanName ErrorCode

  • VlanName MOVED TO... It is the VLAN identifier.
  • ErrorCode MOVED TO... It is the error code when something bad has happened. The errors which are considered until now are notInVlan and notExistingVlan.

listVlansJoinedRequest

This is message to request the list of VLANs the client is connected to.

listVlansJoinedRequest

listVlansJoinedResponse

This is the response message of the previous one, listVlansJoinedRequest.

(A)

listVlansJoinedResponse ListOfVlansJoined

(B)

listVlansJoinedResponse ErrorCode

  • ListOfVlansJoined MOVED TO... It is the list of VLANS joined by the client that issued the message.
  • ErrorCode MOVED TO... The error which is handled at the moment is notInAnyVlan.

clientsInVlanListRequest

With this message the user can ask for the clients which are connected to a VLAN.

clientsInVlanListRequest VlanName

  • VlanName MOVED TO... It is the name of the VLAN the client wants to obtain the list of users connected.

clientsInVlanResponse

It is the message the server answers to the client after receiving a clientsInVlanListRequest

(A)

clientsInVlanResponse VlanName ListOfClients

(B)

clientsInVlanResponse VlanName ErrorCode

  • VlanName MOVED TO... Vlan identifier
  • ListOfClients MOVED TO... The list of clients belonging to the VLAN.
  • ErrorCode MOVED TO... The errors handled are notClientsInVlan and notExistingVlan.

deleteVlanRequest

This message is used to delete a VLAN from the SERVAL server. To delete a VLAN it has to be empty.

deleteVlanRequest VlanId

  • VlanId MOVED TO... The VlanId is the name of the VLAN it wants to be deleted.

deleteVlanResponse

This is the confirmation message of a deleteVlanRequest.

(A)

deleteVlanResponse VlanId

(B)

deleteVlanResponse VlanId ErrorCode

  • VlanId MOVED TO... The name of the VLAN requested for deletion.
  • ErrorCode MOVED TO... The errors handled are vlanEmpty and notExistingVlan.

setOnPromiscouModeRequest

This is used to request turn on the promiscous mode in the client.

setOnPromiscousMode

setOnPromiscousModeResponse

This is the acknowledgment message to a setOnPromiscousModeRequest.

setOnPromiscousModeResponse ResultCode

  • RequestCode can be success or alreadyPromiscousMode.

setOffPromiscouModeRequest

This is used to request turn off the promiscous mode in the client.

setOnPromiscousMode

setOffPromiscousModeResponse

This is the acknowledgment message to a setOffPromiscousModeRequest.

setOnPromiscousModeResponse ResultCode

  • RequestCode can be success or alreadyInNormalMode.

div class="twikiTopicInfo twikiRevInfo twikiGrayText twikiMoved"<&/div>-->

Igalia, S.L. © A Coruña-Pontevedra (Galicia), 2001-2007 - Aviso Legal - Política de privacidad
Igalia™ is a registered trademark of Igalia, S.L. Powered by TWiki