User Tools

Site Tools


b2f:b2f

Open B2F

:!: This document is not normative. It compiles elements that come from the incomplete and partially obsolete “Winlink Open B2F” specification, and completes it with elements that have been found in open source implementations, demonstrations posted by official users, and from field tests.

This specification describes the transfer of messages between Winlink Radio Mail Server (RMS) gateway stations and Winlink compatible user terminal programs (WL2K clients).

When connected with a non-Winlink client or another MBO (Non-Participating Mail Box Operator) that is not a Winlink RMS, messages will be forwarded using the current FBB protocol.

The B2F protocol is an extension of the original FBB amateur packet protocol that was aimed at the manual keyboard user. Standard FBB B1 and lower protocols do not support multiple address messages and messages with embedded attachments. This protocol extension does.

A B2F session MUST operate over a 8-bit clean communication channel, which provides reliable and ordered delivery.

Commands

Message pending proposal

The FC proposal is initially used for any Winlink encapsulated message or Winlink control message.

Other message types may be added in the future.

Standard messages of type Private or Bulletin MAY be proposed using either the lower level FA or FB proposals using the level B1 rules, or as an encapsulated message using level B2.

Unlike FA and FB proposals, the FC proposal does not include sender or receiver address information, as that is included within the encapsulated messages' header as described above.

FA, FB and FC proposals may be intermixed in any combination within a proposal block.

; Proposal Code: "FC"
B2F-PROPCODE = %x46 %x43
 
; Message type. CM = WinLink Control Message, EM = Encapsulated Message 
B2F-TYPE     = 1*2(ALPHA / DIGIT)
 
; Unique Message ID
B2F-MID      = 1*12VCHAR
 
; Uncompressed size
B2F-USIZE    = 1*DIGIT
 
; Compressed size
B2F-CSIZE    = 1*DIGIT
 
; Undocumented field
B2F-UNDOC    = %x30
 
; Proposal definition
B2F-PROPOSAL = B2F-PROPCODE SP B2F_TYPE SP B2F_MID SP B2F_USIZE SP B2F_CSIZE SP B2F-UNDOC CR

GZIP compressed encapsulated message

FD proposals are functionally identical to FC proposals (see section above).

They use the same fields, the same response codes, the same transfer framing and the same B2F message structure.

The only difference is how the encapsulated message is compressed. In an FD transfer, the compressed data stream MUST be a single GZIP member as defined in RFC 1952, using the DEFLATE method (CM = 8).

The csize field gives the length of the GZIP member in bytes, and usize gives the size of the uncompressed encapsulated message.

Resume offsets (!offset) count bytes into the GZIP member.

A station that supports FD proposals MUST include the G flag in its SID.

A station MUST NOT send an FD proposal unless both SIDs contain both the B2F and G flags, and when they do, it SHOULD use FD for every encapsulated message it sends in that session.

; Proposal Code: "FD"
B2F-GZ-PROPCODE =  = %x46 %x43
 
; Proposal definition
B2F-GZ-PROPOSAL = B2F-GZ-PROPCODE SP B2F_TYPE SP B2F_MID SP B2F_USIZE SP B2F_CSIZE SP B2F-UNDOC CR

Calling Station ID

The calling station identification command is to be sent PRIOR the calling station SID.

;FW CALLSIGN

The calling station MAY authenticate with secondary or tactical callsigns. To do so, it MUST add those callsigns immediately followed by the vertical bar character then the 8 digit authentication result, based on those account passwords and the challenge value sent in the ;PQ: comment (see secure login section).

Each extra callsign record is separated by a space character

ABNF Grammar:

B2F-NONCE     = 8*8DIGIT
B2F-AUTH-RESP = 8*8DIGIT
CALLSIGN      = 1*(%x41-5A / DIGIT)
EXTRACALL     = CALLSIGN %x7C B2F-AUTH-RESP
B2F-CALLER-ID = %x3b %x46 %x57 SP CALLSIGN *( SP EXTRACALL ) CR

Secure login

The exchange happens after the SID has been transmitted.

The server sends a ;PQ: proposal with an authentication challenge, which is formatted as follow:

;PQ: 99685857

The client computes the response using the following pseudocode:

S3CRYPT:BEGIN:AESCTR:14AD:wrgBw7/DuMKaw5HDjWdeQ8K1Xj3CjDtjOcKBYUtNDSoNDMKvwq
rDi8K8JsOww7bCixErw4fCgcKBA8Oew6TDm8Kcw4YhNRdjAgwt
VcK2w6MdwpNhwppnw4QbX0HDkSbCgHM8w5I0w78NCsOOwrnCuG
zDq8O0w5oNw5lNw6DCscOHSAlwwowSwqvDlMKAKw7DrMKGAHsp
BCwMd8KjXmjDrMO7RTUTXlRqSU3CvsK4T8K2XT/DsArClsKUwq
bCvD4/PRg+GkxZTWMQw755PxLCi1/Do8Oyw7TClMO3EjzCnMO2
Yj1UwpRGwq5macOqwqFrfH0Dw5Fgw4bDoDzCp8KKR8Ouw7PDmD
gFwpVbwovCqsO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7kH
DMO4wrBswrTCoG0ZwrrDv8KqwovCri0AMsKFw5lJIsOraARJwp
zDncKSS1DDhUpIwrULwp7CocOfMD3CmmPCjsOddsOTN2vDh8Ky
FcK+wqPCpkhQw5N9Fkl0wq/CncOhwoNYOzwaw44TwrJxwoBXIc
KEW00Tw7rCuMOzO8KsOkLCvsKiwp7CtcKhwqrCiMOiwpnDihIs
wrDDocKPw7PDmy3CosKSEDECw53CuUM5woHDg8O8NhdPwrHCv8
OGwq1cBiN4wqbCgjtDb8OYLsOQw5PCr8KNI0jDgTlDbAw6e3/D
oMO6w751DcODwpI9wpINJzfCssOWw5TCmFUTBVnCoBcXclIawq
LCoMOzwoERPAvDnThSwoTDvSl2PU8NwojCpF3DuRjDmcK1w7zC
oXBjccKIwrHCiMKvD3HDlcOdY2Ygw67Co2nDo8KAwrzDkcKvwq
gdcUNjw6TDpMO/w4LCpUVbVA7CvMOudsKjcMO0fcKHw7Zsw64j
w4oywp7Dog8ZTcKcw5MMw6JYw4TDhMO5w6fDow9Bw6HCuVFYw6
jDmUURJsK8PsKqUHLCo2rDsB/CrsK0w47DsMKxSg9+wqI=:END

The result is then sent to the server using the following format:

;PR: 99685857

ABNF Grammar:

B2F-AUTH-CHALLENGE = %x3B %x50 %x51 %x3A SP B2F-NONCE CR
B2F-AUTH-RESPONSE  = %x3B %x50 %x52 %x3A SP B2F-AUTH-RESP CR

Reference source code in paclink-unix, function compute_secure_login_response() and wl2k-go

Secure Gateway Login

When a RMS connects to a CMS, the latter sends a login challenge with ;SQ: proposal.

The auth scheme works the same way the Secure login does.

The RMS answers with a triplet composed of the secure login response, the frequency the client is binding to (decimal form integer in Hertz), and the used mode id.

An almost comprehensive mode id list can be found in LinBPQ. The table is stored in WL2KModeList in file HFCommon.c

ABNF Grammar:

MODE-ID               = 1*DIGIT
CALLED-QRG-HZ         = 1*DIGIT
B2F_GW_AUTH_CHALLENGE = %x3B %x53 %x51 %x3A SP B2F-NONCE CR
B2F_GW_AUTH_RESPONSE  = %x3B %x53 %x52 %x3A SP B2F-AUTH-RESP SP CALLED-QRG-HZ SP MODE-ID CR

A RMS SHOULD NOT transmit the ;SQ: and ;SR: comments over the air.

If the RMS authentication fails, the CMS MAY print a reason explaining the reason justifying the refusal of service. Then, the CMS SHALL terminate the connection to the RMS.

In turn, the RMS SHOULD transmit to its client a comment indicating the connection to the CMS has been refused. Then, it SHALL terminate the connection to the client.

If the RMS authentication succeeds, the RMS switches to “transparent mode”, relaying message flowing from one side to the other. The CMS then performs user authentication, as described in [section 11.4.2.1](#11421-client-authentication).

Hybrid Network Metadata

Hybrid Gateway

A Gateway configured in store and forward mode SHALL transparently pipeline its connection to a CMS server, when it is online.

It inserts the following header before the SID:

;WL2K-Radio/Internet_Network

When it is offline, the gateway sends the following immediately before its SID banner:

;WL2K-Radio_Network

RMS Post Office

A RMS Post Office acts as a local CMS that is isolated from the Winlink Network.

Consequently, a RMS Post Office MUST send the following comment header immediately before its SID banner:

;WL2K-Post_Office

Additionally, a RMS Post Office MUST set the 'W' flag in its SID banner.

Data transfer

Message structure

A message is structured in 3 parts:

  1. The message header
  2. The message body
  3. Attachments

Message Header

The header contains the message properties, such as its MID, origination date, originator, destination(s), subject, etc. The address header is US-ASCII encoded. Each line is separated by carriage return/line feed (0x0d 0x0a).

Packet headers received from a packet connection may optionally be retained as part of the body of the message. RFC 822 headers received as part of a message from the Internet will be parsed and removed at the point of entry into the Winlink system.

Message Body

The message body MAY NOT be empty. Its content is encoded to the US-ASCII character set.

It is separated from the address header by a single blank line.

The exact length (in characters) of the body of the message is indicated in the address header.

The message body is terminated with a carriage return/line feed character sequence. These two characters are not included in the length of the message body indicated in the address header and are in addition to any carriage return/line feed characters that may be in the body of the message.

The third part of the message is the attachments. There may be any number of attachments. For each attachment, there is a parameter in the address header that includes the exact length of the attachment, the original file name and extension for the attachment. The file name and extension is limited to 50 characters. An attachment is a sequence of 8-bit bytes without restriction. An attachment is always terminated by a carriage return/line feed. The carriage return/line feed sequence is not included in the attachment length indicted in the address header.

ABNF Grammar:

 
b2f/b2f.txt · Last modified: by f4hof