Protocols/OSCAR/Foodgroups/ICBM/Tutorials: Difference between revisions

From NINA Wiki
Jump to navigation Jump to search
m (AD moved page Protocols/OSCAR/Flow IM to Protocols/OSCAR/Foodgroups/ICBM/Tutorials: Changed URL structure)
No edit summary
Line 78: Line 78:
-->
-->


An IM conversation involves multiple CLIENT_EVENTS and ICBMs. CLIENT_EVENTS are used to inform the remote user what the sender is doing so the remote user knows they are still there. Here is a sample session where GabbyGrace is sending IMs to ChattingChuck.


== Sending Typing Event ==
A client can optionally support sending a typing notification to the other user.
{| class="wikitable"
! Field
! Size
! Value
|-
| u08
| flapHeader.startMarker
| '*'
|-
| u08
| flapHeader.frameType
|
2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])
|-
| u16
| flapHeader.sequenceNumber
| XX
|-
| u16
| flapHeader.payloadLength
| YY
|-
| u16
| snacHeader.foodgroup
|
4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])
|-
| u16
| snacHeader.type
|
20 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT ICBM__CLIENT_EVENT])
|-
| u16
| snacHeader.flags
| 0
|-
| u32
| snacHeader.requestId
| ZZ
|-
| Array of u08
| cookie
| '12345678'
|-
| u16
| channel
|
1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])
|-
| u08
| loginId.len
| 13
|-
| Array of u08
| loginId.value
| 'ChattingChuck'
|-
| u16
| event
|
2 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT#Class:_ICBM_EVENTS ICBM__EVENTS_TYPING])
|}
=== Receiving Typing Event ===
The receiving side of the client event looks identical to the sending side other then the loginId has been reversed.
{| class="wikitable"
! Field
! Size
! Value
|-
| u08
| flapHeader.startMarker
| '*'
|-
| u08
| flapHeader.frameType
|
2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])
|-
| u16
| flapHeader.sequenceNumber
| XX
|-
| u16
| flapHeader.payloadLength
| YY
|-
| u16
| snacHeader.foodgroup
|
4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])
|-
| u16
| snacHeader.type
|
20 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT ICBM__CLIENT_EVENT])
|-
| u16
| snacHeader.flags
| 0
|-
| u32
| snacHeader.requestId
| ZZ
|-
| Array of u08
| cookie
| '12345678'
|-
| u16
| channel
|
1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])
|-
| u08
| loginId.len
| 10
|-
| Array of u08
| loginId.value
| 'GabbyGrace'
|-
| u16
| event
|
2 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT#Class:_ICBM_EVENTS ICBM__EVENTS_TYPING])
|}
== Sending IM ==
{| class="wikitable"
! Field
! Size
! Value
|-
| u08
| flapHeader.startMarker
| '*'
|-
| u08
| flapHeader.frameType
|
2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])
|-
| u16
| flapHeader.sequenceNumber
| XX
|-
| u16
| flapHeader.payloadLength
| YY
|-
| u16
| snacHeader.foodgroup
|
4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])
|-
| u16
| snacHeader.type
|
6 ([Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TOHOST ICBM__CHANNEL_MSG_TOHOST])
|-
| u16
| snacHeader.flags
| 0
|-
| u32
| snacHeader.requestId
| ZZ
|-
| Array of u08
| cookie
| '12345678'
|-
| u16
| channel
|
1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])
|-
| u08
| destLoginId.len
| 13
|-
| Array of u08
| destLoginId.value
| 'ChattingChuck'
|-
| u16
| icbmTlvs[0].tag
|
3 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS ICBM__TAGS_REQUEST_HOST_ACK])
|-
| u16
| icbmTlvs[0].len
| 0
|-
| u16
| icbmTlvs[1].tag
|
2 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS ICBM__TAGS_IM_DATA])
|-
| u16
| icbmTlvs[1].len
| 15
|-
| u16
| icbmTlvs[1].imData[0].tag
|
0x0501 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_CAPABILITIES])
|-
| u16
| icbmTlvs[1].imData[0].len
| 1
|-
| u08
| icbmTlvs[1].imData[0].value
| 1
|-
| u16
| icbmTlvs[1].imData[1].tag
|
0x0101 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_TEXT])
|-
| u16
| icbmTlvs[1].imData[1].len
| 6
|-
| u16
| icbmTlvs[1].imData[1].encoding
|
0 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_IM_ENCODING ICBM__IM_SECTION_ENCODINGS_ASCII])
|-
| u16
| icbmTlvs[1].imData[1].language
| 0
|-
| u08
| icbmTlvs[1].imData[1].data
| 'Hi'
|}
=== Receiving IM ===
{| class="wikitable"
! Field
! Size
! Value
|-
| u08
| flapHeader.startMarker
| '*'
|-
| u08
| flapHeader.frameType
|
2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])
|-
| u16
| flapHeader.sequenceNumber
| XX
|-
| u16
| flapHeader.payloadLength
| YY
|-
| u16
| snacHeader.foodgroup
|
4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])
|-
| u16
| snacHeader.type
|
7 ([Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TOCLIENT ICBM__CHANNEL_MSG_TOCLIENT])
|-
| u16
| snacHeader.flags
| 0
|-
| u32
| snacHeader.requestId
| ZZ
|-
| Array of u08
| cookie
| '12345678'
|-
| u16
| channel
|
1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])
|-
| u08
| info.loginId.len
| 10
|-
| Array of u08
| info.loginId.value
| 'GabbyGrace'
|-
| u16
| info.evil
| 0
|-
| u16
| info.attrs.num
| 1
|-
| u16
| info.attrs[0].tag
|
1 ([Protocols/OSCAR/Foodgroups/OSERVICE/Datatypes/USERINFO#TLV_Class:_OSERVICE_USER_INFO_TAGS OSERVICE__USER_INFO_TAGS_NICK_FLAGS])
|-
| u16
| info.attrs[0].len
| 2
|-
| u16
| info.attrs[0].value
| 0x10
|-
| u16
| icbmTlvs[0].tag
|
2 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS ICBM__TAGS_IM_DATA])
|-
| u16
| icbmTlvs[0].len
| 15
|-
| u16
| icbmTlvs[0].imData[0].tag
|
0x0501 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_CAPABILITIES])
|-
| u16
| icbmTlvs[0].imData[0].len
| 1
|-
| u08
| icbmTlvs[0].imData[0].value
| 1
|-
| u16
| icbmTlvs[0].imData[1].tag
|
0x0101 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_TEXT])
|-
| u16
| icbmTlvs[0].imData[1].len
| 6
|-
| u16
| icbmTlvs[0].imData[1].encoding
|
0 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_IM_ENCODING ICBM__IM_SECTION_ENCODINGS_ASCII])
|-
| u16
| icbmTlvs[0].imData[1].language
| 0
|-
| u08
| icbmTlvs[0].imData[1].data
| 'Hi'
|}


[[Category:Stub]]
[[Category:Stub]]
Line 84: Line 456:
[[Category:AIM]]
[[Category:AIM]]
[[Category:Protocols/OSCAR]]
[[Category:Protocols/OSCAR]]
[[Category:Protocols/OSCAR/SNACs]]
[[Category:Protocols/OSCAR/Tutorials]]
[[Category:Work_In_Progress]]
[[Category:Work_In_Progress]]

Revision as of 03:22, 27 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)


Notes from another

An IM conversation involves multiple CLIENT_EVENTS and ICBMs. CLIENT_EVENTS are used to inform the remote user what the sender is doing so the remote user knows they are still there. Here is a sample session where GabbyGrace is sending IMs to ChattingChuck.

Sending Typing Event

A client can optionally support sending a typing notification to the other user.

Field Size Value
u08 flapHeader.startMarker '*'
u08 flapHeader.frameType

2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])

u16 flapHeader.sequenceNumber XX
u16 flapHeader.payloadLength YY
u16 snacHeader.foodgroup

4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])

u16 snacHeader.type

20 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT ICBM__CLIENT_EVENT])

u16 snacHeader.flags 0
u32 snacHeader.requestId ZZ
Array of u08 cookie '12345678'
u16 channel

1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])

u08 loginId.len 13
Array of u08 loginId.value 'ChattingChuck'
u16 event

2 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT#Class:_ICBM_EVENTS ICBM__EVENTS_TYPING])

Receiving Typing Event

The receiving side of the client event looks identical to the sending side other then the loginId has been reversed.

Field Size Value
u08 flapHeader.startMarker '*'
u08 flapHeader.frameType

2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])

u16 flapHeader.sequenceNumber XX
u16 flapHeader.payloadLength YY
u16 snacHeader.foodgroup

4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])

u16 snacHeader.type

20 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT ICBM__CLIENT_EVENT])

u16 snacHeader.flags 0
u32 snacHeader.requestId ZZ
Array of u08 cookie '12345678'
u16 channel

1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])

u08 loginId.len 10
Array of u08 loginId.value 'GabbyGrace'
u16 event

2 ([Protocols/OSCAR/SNAC/ICBM_CLIENT_EVENT#Class:_ICBM_EVENTS ICBM__EVENTS_TYPING])

Sending IM

Field Size Value
u08 flapHeader.startMarker '*'
u08 flapHeader.frameType

2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])

u16 flapHeader.sequenceNumber XX
u16 flapHeader.payloadLength YY
u16 snacHeader.foodgroup

4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])

u16 snacHeader.type

6 ([Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TOHOST ICBM__CHANNEL_MSG_TOHOST])

u16 snacHeader.flags 0
u32 snacHeader.requestId ZZ
Array of u08 cookie '12345678'
u16 channel

1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])

u08 destLoginId.len 13
Array of u08 destLoginId.value 'ChattingChuck'
u16 icbmTlvs[0].tag

3 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS ICBM__TAGS_REQUEST_HOST_ACK])

u16 icbmTlvs[0].len 0
u16 icbmTlvs[1].tag

2 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS ICBM__TAGS_IM_DATA])

u16 icbmTlvs[1].len 15
u16 icbmTlvs[1].imData[0].tag

0x0501 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_CAPABILITIES])

u16 icbmTlvs[1].imData[0].len 1
u08 icbmTlvs[1].imData[0].value 1
u16 icbmTlvs[1].imData[1].tag

0x0101 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_TEXT])

u16 icbmTlvs[1].imData[1].len 6
u16 icbmTlvs[1].imData[1].encoding

0 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_IM_ENCODING ICBM__IM_SECTION_ENCODINGS_ASCII])

u16 icbmTlvs[1].imData[1].language 0
u08 icbmTlvs[1].imData[1].data 'Hi'

Receiving IM

Field Size Value
u08 flapHeader.startMarker '*'
u08 flapHeader.frameType

2 ([Protocols/OSCAR/FLAP#Class:_FLAP_FRAME FLAP__FRAME_TYPE_DATA])

u16 flapHeader.sequenceNumber XX
u16 flapHeader.payloadLength YY
u16 snacHeader.foodgroup

4 ([Protocols/OSCAR/Foodgroups/ICBM ICBM])

u16 snacHeader.type

7 ([Protocols/OSCAR/SNAC/ICBM_CHANNEL_MSG_TOCLIENT ICBM__CHANNEL_MSG_TOCLIENT])

u16 snacHeader.flags 0
u32 snacHeader.requestId ZZ
Array of u08 cookie '12345678'
u16 channel

1 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_CHANNELS ICBM__CHANNELS_IM])

u08 info.loginId.len 10
Array of u08 info.loginId.value 'GabbyGrace'
u16 info.evil 0
u16 info.attrs.num 1
u16 info.attrs[0].tag

1 ([Protocols/OSCAR/Foodgroups/OSERVICE/Datatypes/USERINFO#TLV_Class:_OSERVICE_USER_INFO_TAGS OSERVICE__USER_INFO_TAGS_NICK_FLAGS])

u16 info.attrs[0].len 2
u16 info.attrs[0].value 0x10
u16 icbmTlvs[0].tag

2 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_TAGS ICBM__TAGS_IM_DATA])

u16 icbmTlvs[0].len 15
u16 icbmTlvs[0].imData[0].tag

0x0501 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_CAPABILITIES])

u16 icbmTlvs[0].imData[0].len 1
u08 icbmTlvs[0].imData[0].value 1
u16 icbmTlvs[0].imData[1].tag

0x0101 ([Protocols/OSCAR/Foodgroups/ICBM#TLV_Class:_ICBM_IM_DATA_TAGS ICBM__IM_DATA_TAGS_IM_TEXT])

u16 icbmTlvs[0].imData[1].len 6
u16 icbmTlvs[0].imData[1].encoding

0 ([Protocols/OSCAR/Foodgroups/ICBM#Class:_ICBM_IM_ENCODING ICBM__IM_SECTION_ENCODINGS_ASCII])

u16 icbmTlvs[0].imData[1].language 0
u08 icbmTlvs[0].imData[1].data 'Hi'