ID Generation
Original Post: Transaction ID, Channel ID, Signalling Identifier generation ( eGroups
Msg.) Date: 2000-11-14
The Transaction ID in SDP, Channel ID in L2CAP and Identifier in
L2CAP signalling packets are all generated locally by the device in question.
Question:
While generating these IDs can we simply keep track of last
allocated value and allocate the newly incremented value whenever we need?. Can we safely
assume that these values will never exhaust or even if these values exhaust we can start
using from initial value i.e. 0 in case of transaction ID, 40 in case of channel ID and 0
in case of signalling packet.
Answer:
The allocation of IDs is implementation specific. However,
logic would dictate that you need to be sure that an allocated ID is not being used
locally. So a list of currently allocated IDs is probably the best solution.
The sequence by which you pick an ID is entirely up to you, the implementor.
(just don't use an ID that is in use)
|