User Tools

Site Tools


b2f:bcf_v0

This is an old revision of the document!


Binary Compressed Forward Version 0

The compressed version of the protocol is an extension to the ASCII Basic Protocol.

  • Compressed forward availability is reported by the letter B in the SID extensions field.
  • As it is an extension of the basic protocol, the SID extension field MUST also advertise the ASCII Basic Protocol with the letter F. A SID with the letter B but no F will be treated as if neither extensions have been advertised.

The Binary Compressed Forward protocol MUST operate over a 8-bit clean communication bearer, which provides reliable and ordered delivery.

Transfer Modes

The control plane stays the same as the ASCII Basis Protocol, except for the original FB proposal, which is replaced by the following proposals.

The message/file payload is transferred using a different format from the ASCII Basic Protocol.

ASCII Message Transfer Mode

FIXME proposal format definition

Message header format:

0x01 Attributes size Message title 0x00 Offset 0x00
1 byte 1 to 80 bytes 1 to 6 ASCII digits
Attributes size

ABNF Grammar:

BCFv0_ASCII_ATTR_SZ   = %x04-%x58
BCFv0_ASCII_HDR_TITLE = 1*80( WSP / HTAB / VCHAR )
BCFv0_ASCII_OFFSET    = 1*6DIGIT
BCFv0_ASCII_HEADER    = %x01 BCFv0_ASCII_ATTR_SZ BCFv0_ASCII_HDR_TITLE %x00 BCFv0_ASCII_OFFSET %x00 

Security considerations:

  • If you're using a memory-unsafe language, you SHOULD pay extra care with the attribute size field to avoid buffer overflow attacks.

Binary File Transfer Mode

FIXME proposal format definition

Message header format:

0x01 Attributes size Filename 0x00 Offset 0x00
1 byte 1 to 80 bytes 1 to 6 ASCII digits
Attributes size

ABNF Grammar:

BCFv0_BIN_HDR_SZ    = %x04-%x58
BCFv0_BIN_HDR_TITLE = 1*80( WSP / HTAB / VCHAR )
BCFv0_BIN_OFFSET    = 1*6DIGIT
BCFv0_BIN_HEADER    = %x01 BCFv0_BIN_HDR_SZ BCFv0_BIN_HDR_TITLE %x00 BCFv0_BIN_OFFSET %x00 

Data Transfer Block

Block format:

0x02 Data chunk size Data chunk
1 byte 1 to 256 bytes
equals 0 if chunk is 256 bytes long

ABNF Grammar:

BCFv0_CHUNK_SZ   = OCTET
BCFv0_CHUNK      = 1*256OCTET
BCFv0_DATA_BLOCK = %x02 BCFv0_CHUNK_SZ BCFv0_CHUNK

The last data block is followed by the end of file specifier and the checksum.

End of file Block

0x04 Checksum
1 byte

ABNF Grammar:

BCFv0_CHECKSUM = OCTET
BCFv0_EOF      = %x04 BCFv0_CHECKSUM

The checksum is the sum of all the transmitted file' data bytes, modulo 256 (8 bits) and then two's complemented.

To perform validation, compute the sum of data and checksum bytes, modulo 256. The checksum is considered valid if the result of the last calculation equals 0.

In case of a checksum error:

  1. The message or the file is ignored.
  2. The following comment is sent back.
  3. The system issues a disconnect request
*** Erreur checksum

Transaction flow

FIXME To be completed

b2f/bcf_v0.1739529361.txt.gz · Last modified: 2025/02/14 10:36 by f4hof