1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-12-16 12:30:06 +00:00

Minor lpeer refactoring

- Packets are now dispatched based on a packet function handler map which is passed to laikaS_newPeer()
This commit is contained in:
2022-01-30 19:10:10 -06:00
parent 1630f6277f
commit 282516797e
7 changed files with 67 additions and 62 deletions

View File

@@ -14,6 +14,7 @@ enum {
* uint8_t laikaMagic[LAIKA_MAGICLEN];
* uint8_t majorVer;
* uint8_t minorVer;
* uint8_t peerType;
* uint8_t encNonce[LAIKAENC_SIZE(LAIKA_NONCESIZE)]; -- encrypted using shared pubKey
* uint8_t pubKey[crypto_box_PUBLICKEYBYTES]; -- freshly generated pubKey to encrypt decrypted nonce with
*/
@@ -27,6 +28,8 @@ enum {
* uint8_t pktID;
* uint16_t pktSize;
*/
LAIKAPKT_CHALLENGE_REQ,
LAIKAPKT_CHALLENGE_RES,
LAIKAPKT_MAXNONE
};