Hazelnet 3.0.0
Reference implementation of the CAN Bus Security (CBS) protocol
Data Fields
hzl_ServerGroupConfig Struct Reference

Hazelnet Server constant Group configuration. More...

#include <hzl_Server.h>

Data Fields

HZL_SET_BY_USER uint32_t maxCtrnonceDelayMsgs
 Maximum Counter Nonce Delay (D^{max}_G) in milliseconds, used to filter out recent messages from old ones. More...
 
HZL_SET_BY_USER hzl_CtrNonce_t ctrNonceUpperLimit
 Counter Nonce upper limit (N^{exp}_G), used to know when the current Session expires due to the amount of messages sent. More...
 
HZL_SET_BY_USER uint32_t sessionDurationMillis
 Server-Side Session time Duration (s^{exp}_G) in milliseconds. More...
 
HZL_SET_BY_USER uint32_t delayBetweenRenNotificationsMillis
 Delay between consecutive Session renewal notification (REN) messages (t^{ntf}_G) in milliseconds. More...
 
HZL_SET_BY_USER hzl_ServerBitMap_t clientSidsInGroupBitmap
 Bitmap of the Client SIDs included in this Group. More...
 
HZL_SET_BY_USER uint16_t maxSilenceIntervalMillis
 Maximum Silence Interval (S^{max}_G) in milliseconds, used to filter out recent messages from old ones. More...
 
HZL_SET_BY_USER hzl_Gid_t gid
 Group Identifier of this Group (id_G). More...
 
uint8_t unusedPadding [1]
 Padding to the next struct. More...
 

Detailed Description

Hazelnet Server constant Group configuration.

Unique per Group, multiple instances on the Server. Initialised by the user, not modified by the Server.

Field Documentation

◆ maxCtrnonceDelayMsgs

HZL_SET_BY_USER uint32_t hzl_ServerGroupConfig::maxCtrnonceDelayMsgs

Maximum Counter Nonce Delay (D^{max}_G) in milliseconds, used to filter out recent messages from old ones.

Must be in [0, HZL_SERVER_LARGEST_MAX_COUNTER_NONCE_DELAY].

◆ ctrNonceUpperLimit

HZL_SET_BY_USER hzl_CtrNonce_t hzl_ServerGroupConfig::ctrNonceUpperLimit

Counter Nonce upper limit (N^{exp}_G), used to know when the current Session expires due to the amount of messages sent.

Must be in [0, HZL_SERVER_MAX_COUNTER_NONCE_UPPER_LIMIT].

◆ sessionDurationMillis

HZL_SET_BY_USER uint32_t hzl_ServerGroupConfig::sessionDurationMillis

Server-Side Session time Duration (s^{exp}_G) in milliseconds.

Used to know when the current Session expires due to the enough time passed since its establishment.

May have any value in [0, 0xFFFFFFFF].

◆ delayBetweenRenNotificationsMillis

HZL_SET_BY_USER uint32_t hzl_ServerGroupConfig::delayBetweenRenNotificationsMillis

Delay between consecutive Session renewal notification (REN) messages (t^{ntf}_G) in milliseconds.

Used to know when to send the next REN message.

Must be in ]0, floor(sessionDurationMillis/6)[.

◆ clientSidsInGroupBitmap

HZL_SET_BY_USER hzl_ServerBitMap_t hzl_ServerGroupConfig::clientSidsInGroupBitmap

Bitmap of the Client SIDs included in this Group.

If the bit is set (1), it's index is the SID of the included Client. The first bit (index 0, least significant) indicates the Client with SID == 1; the i-th bit (representing 2^i) indicates the Client with SID i.

Constraints:

  • Each Group must contain at least one Client, thus have at least one bit set.
  • Each Group must contain only known Clients, thus is a SID is indicated in the bitmap, it must appear in the array of hzl_ServerClientConfig_t structs.
  • The broadcast Group with GID == HZL_BROADCAST_GID must contain all the Clients listed in the array of hzl_ServerClientConfig_t structs but can contain more than that (the extra bits are ignored). This allows to simply set all bits of the broadcast bitmap always.
  • Each Client may appear in more than one Group.

◆ maxSilenceIntervalMillis

HZL_SET_BY_USER uint16_t hzl_ServerGroupConfig::maxSilenceIntervalMillis

Maximum Silence Interval (S^{max}_G) in milliseconds, used to filter out recent messages from old ones.

May have any value in [0, 0xFFFF].

◆ gid

HZL_SET_BY_USER hzl_Gid_t hzl_ServerGroupConfig::gid

Group Identifier of this Group (id_G).

An array of these structs must be sorted so that each array index matches this field. In other words, the structs must be sorted by a strictly ascending GID, starting from 0 (included) and without gaps.

This field is not strictly required (can be inferred from the array index), but it's using "free" space that would be anyhow occupied by the padding at the struct end until the next one, and it helps during debugging.

◆ unusedPadding

uint8_t hzl_ServerGroupConfig::unusedPadding[1]

Padding to the next struct.


The documentation for this struct was generated from the following file: