Protocols/OSCAR/FLAP: Difference between revisions

From NINA Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:




FLAP (Frame Layer Protocol) provides the packet framing on top of TCP or TLS layer for the OSCAR protocol. Each message sent to and from the AIM backend is encapsulated in a FLAP frame that is easily identified using a 6 byte header followed by a variable length data segment. The payload of a FLAP frame is in most cases a [Protocols/OSCAR/SNAC|SNAC].
FLAP (Frame Layer Protocol) provides the packet framing on top of TCP or TLS layer for the OSCAR protocol. Each message sent to and from the AIM backend is encapsulated in a FLAP frame that is easily identified using a 6 byte header followed by a variable length data segment. The payload of a FLAP frame is in most cases a [[Protocols/OSCAR/SNAC|SNAC]].


== FLAP Header ==
== FLAP Header ==
Line 15: Line 15:
! Notes
! Notes
|-
|-
| FLAP_MARKER
| FLAP__MARKER
| uint8 (byte)
| uint8 (byte)
| ASTERISK (literal ASCII "*")
| ASTERISK (literal ASCII "*")
Line 21: Line 21:
| FLAP__FRAME
| FLAP__FRAME
| uint8 (byte)
| uint8 (byte)
| ''[Protocols/OSCAR/FLAP#Class:_FLAP__FRAME|Class: FLAP__FRAME_TYPE]''
| ''[[Protocols/OSCAR/FLAP#Class:_FLAP__FRAME|Class: FLAP__FRAME_TYPE]]''
|-
|-
| FLAP_SEQUENCE
| FLAP_SEQUENCE
Line 27: Line 27:
| Initialized to a random value, increments for each send
| Initialized to a random value, increments for each send
|-
|-
| payloadLength
| FLAP_LENGTH
| uint16 (word)
| uint16 (word)
| Length of data, does not include the 6 byte header length
| Length of data, does not include the 6 byte header length

Revision as of 12:26, 17 March 2020

OSCAR Protocol
IntroductionTermsClients
Basic
DatatypesFLAPSNACTLV
UUIDsErrorsTool IDs
Host Interaction
Rate LimitsMigrationMessages
Other Services
ADMINADVERTALERT
BARTBOSBUCPCHAT
CHAT_NAV
Tutorials
Sign OnBARTRendezvous
ICBMLocateBuddies
Foodgroups
OSERVICE (0x0001)
LOCATE (0x0002)
BUDDY (0x0003)
ICBM (0x0004)
ADVERT (0x0005)
INVITE (0x0006)
ADMIN (0x0007)
POPUP (0x0008)
PD (0x0009)
USER_LOOKUP (0x000A)
STATS (0x000B)
TRANSLATE (0x000C)
CHAT_NAV (0x000D)
CHAT (0x000E)
ODIR (0x000F)
BART (0x0010)
FEEDBAG (0x0013)
ICQ (0x0015)
BUCP (0x0017)
ALERT (0x0018)
PLUGIN (0x0022)
UNNAMED_FG_24 (0x0024)
MDIR (0x0025)
ARS (0x044A)


FLAP (Frame Layer Protocol) provides the packet framing on top of TCP or TLS layer for the OSCAR protocol. Each message sent to and from the AIM backend is encapsulated in a FLAP frame that is easily identified using a 6 byte header followed by a variable length data segment. The payload of a FLAP frame is in most cases a SNAC.

FLAP Header

The header contains the frame type, a sequence number, and the length of the following data segment. The sequence number is independently sequential in each direction. Packets from the server to client have one sequence number, while the packets from the client to server have a different independently increasing number.

If the server receives a sequence number out of order it will terminate the connection. A common mistake is to use a uint8 (byte) to represent the sequence number, which will roll over at 255 and cause the server to disconnect the client.

Name Type Notes
FLAP__MARKER uint8 (byte) ASTERISK (literal ASCII "*")
FLAP__FRAME uint8 (byte) Class: FLAP__FRAME_TYPE
FLAP_SEQUENCE uint16 (word) Initialized to a random value, increments for each send
FLAP_LENGTH uint16 (word) Length of data, does not include the 6 byte header length