Added support for encryption and decryption of the packetbuf if macros

NETSTACK_ENCRYPT and NETSTACK_DECRYPT are defined. Those are intended
to be called as functions NETSTACK_ENCRYPT() and NETSTACK_DECRYPT() to
encrypt and decrypt the packetbuf, respectively. If needed, an
initialization function by the name NETSTACK_ENCRYPTION_INIT() can
also be defined.
This commit is contained in:
Adam Dunkels 2012-11-24 17:18:59 +01:00
parent 63d205e4a2
commit cb7842bd16
3 changed files with 23 additions and 1 deletions

View file

@ -46,5 +46,9 @@ netstack_init(void)
NETSTACK_RDC.init();
NETSTACK_MAC.init();
NETSTACK_NETWORK.init();
#ifdef NETSTACK_ENCRYPTION_INIT
NETSTACK_ENCRYPTION_INIT();
#endif /* NETSTACK_ENCRYPTION_INIT */
}
/*---------------------------------------------------------------------------*/