Home
last modified time | relevance | path

Searched refs:macMsg (Results 1 – 7 of 7) sorted by relevance

/loramac-node-2.7.6/src/mac/
DLoRaMacSerializer.c24 LoRaMacSerializerStatus_t LoRaMacSerializerJoinRequest( LoRaMacMessageJoinRequest_t* macMsg ) in LoRaMacSerializerJoinRequest() argument
26 if( ( macMsg == 0 ) || ( macMsg->Buffer == 0 ) ) in LoRaMacSerializerJoinRequest()
34 if( macMsg->BufSize < LORAMAC_JOIN_REQ_MSG_SIZE ) in LoRaMacSerializerJoinRequest()
39 macMsg->Buffer[bufItr++] = macMsg->MHDR.Value; in LoRaMacSerializerJoinRequest()
41 memcpyr( &macMsg->Buffer[bufItr], macMsg->JoinEUI, LORAMAC_JOIN_EUI_FIELD_SIZE ); in LoRaMacSerializerJoinRequest()
44 memcpyr( &macMsg->Buffer[bufItr], macMsg->DevEUI, LORAMAC_DEV_EUI_FIELD_SIZE ); in LoRaMacSerializerJoinRequest()
47 macMsg->Buffer[bufItr++] = macMsg->DevNonce & 0xFF; in LoRaMacSerializerJoinRequest()
48 macMsg->Buffer[bufItr++] = ( macMsg->DevNonce >> 8 ) & 0xFF; in LoRaMacSerializerJoinRequest()
50 macMsg->Buffer[bufItr++] = macMsg->MIC & 0xFF; in LoRaMacSerializerJoinRequest()
51 macMsg->Buffer[bufItr++] = ( macMsg->MIC >> 8 ) & 0xFF; in LoRaMacSerializerJoinRequest()
[all …]
DLoRaMacParser.c24 LoRaMacParserStatus_t LoRaMacParserJoinAccept( LoRaMacMessageJoinAccept_t* macMsg ) in LoRaMacParserJoinAccept() argument
26 if( ( macMsg == 0 ) || ( macMsg->Buffer == 0 ) ) in LoRaMacParserJoinAccept()
33 macMsg->MHDR.Value = macMsg->Buffer[bufItr++]; in LoRaMacParserJoinAccept()
35 memcpy1( macMsg->JoinNonce, &macMsg->Buffer[bufItr], 3 ); in LoRaMacParserJoinAccept()
38 memcpy1( macMsg->NetID, &macMsg->Buffer[bufItr], 3 ); in LoRaMacParserJoinAccept()
41 macMsg->DevAddr = ( uint32_t ) macMsg->Buffer[bufItr++]; in LoRaMacParserJoinAccept()
42 macMsg->DevAddr |= ( ( uint32_t ) macMsg->Buffer[bufItr++] << 8 ); in LoRaMacParserJoinAccept()
43 macMsg->DevAddr |= ( ( uint32_t ) macMsg->Buffer[bufItr++] << 16 ); in LoRaMacParserJoinAccept()
44 macMsg->DevAddr |= ( ( uint32_t ) macMsg->Buffer[bufItr++] << 24 ); in LoRaMacParserJoinAccept()
46 macMsg->DLSettings.Value = macMsg->Buffer[bufItr++]; in LoRaMacParserJoinAccept()
[all …]
DLoRaMacCrypto.c958 LoRaMacCryptoStatus_t LoRaMacCryptoPrepareJoinRequest( LoRaMacMessageJoinRequest_t* macMsg ) in LoRaMacCryptoPrepareJoinRequest() argument
960 if( macMsg == 0 ) in LoRaMacCryptoPrepareJoinRequest()
974 macMsg->DevNonce = CryptoNvm->DevNonce; in LoRaMacCryptoPrepareJoinRequest()
978 if( DeriveLifeTimeSessionKey( J_S_INT_KEY, macMsg->DevEUI ) != LORAMAC_CRYPTO_SUCCESS ) in LoRaMacCryptoPrepareJoinRequest()
982 if( DeriveLifeTimeSessionKey( J_S_ENC_KEY, macMsg->DevEUI ) != LORAMAC_CRYPTO_SUCCESS ) in LoRaMacCryptoPrepareJoinRequest()
989 if( LoRaMacSerializerJoinRequest( macMsg ) != LORAMAC_SERIALIZER_SUCCESS ) in LoRaMacCryptoPrepareJoinRequest()
995 …mentComputeAesCmac( NULL, macMsg->Buffer, ( LORAMAC_JOIN_REQ_MSG_SIZE - LORAMAC_MIC_FIELD_SIZE ), … in LoRaMacCryptoPrepareJoinRequest()
1001 if( LoRaMacSerializerJoinRequest( macMsg ) != LORAMAC_SERIALIZER_SUCCESS ) in LoRaMacCryptoPrepareJoinRequest()
1010 LoRaMacCryptoStatus_t LoRaMacCryptoPrepareReJoinType1( LoRaMacMessageReJoinType1_t* macMsg ) in LoRaMacCryptoPrepareReJoinType1() argument
1012 if( macMsg == 0 ) in LoRaMacCryptoPrepareReJoinType1()
[all …]
DLoRaMacCrypto.h228 LoRaMacCryptoStatus_t LoRaMacCryptoPrepareJoinRequest( LoRaMacMessageJoinRequest_t* macMsg );
237 LoRaMacCryptoStatus_t LoRaMacCryptoPrepareReJoinType1( LoRaMacMessageReJoinType1_t* macMsg );
246 LoRaMacCryptoStatus_t LoRaMacCryptoPrepareReJoinType0or2( LoRaMacMessageReJoinType0or2_t* macMsg );
257 …oinAccept( JoinReqIdentifier_t joinReqType, uint8_t* joinEUI, LoRaMacMessageJoinAccept_t* macMsg );
268 …acCryptoSecureMessage( uint32_t fCntUp, uint8_t txDr, uint8_t txCh, LoRaMacMessageData_t* macMsg );
280 …drID, uint32_t address, FCntIdentifier_t fCntID, uint32_t fCntDown, LoRaMacMessageData_t* macMsg );
DLoRaMacSerializer.h77 LoRaMacSerializerStatus_t LoRaMacSerializerJoinRequest( LoRaMacMessageJoinRequest_t* macMsg );
85 LoRaMacSerializerStatus_t LoRaMacSerializerReJoinType1( LoRaMacMessageReJoinType1_t* macMsg );
93 LoRaMacSerializerStatus_t LoRaMacSerializerReJoinType0or2( LoRaMacMessageReJoinType0or2_t* macMsg );
101 LoRaMacSerializerStatus_t LoRaMacSerializerData( LoRaMacMessageData_t* macMsg );
DLoRaMacParser.h78 LoRaMacParserStatus_t LoRaMacParserJoinAccept( LoRaMacMessageJoinAccept_t *macMsg );
86 LoRaMacParserStatus_t LoRaMacParserData( LoRaMacMessageData_t *macMsg );
DLoRaMac.c353 …ntDown( AddressIdentifier_t addrID, FType_t fType, LoRaMacMessageData_t* macMsg, Version_t lrWanVe…
539 LoRaMacStatus_t DetermineFrameType( LoRaMacMessageData_t* macMsg, FType_t* fType );
1798 …ntDown( AddressIdentifier_t addrID, FType_t fType, LoRaMacMessageData_t* macMsg, Version_t lrWanVe… in GetFCntDown() argument
1801 if( ( macMsg == NULL ) || ( fCntID == NULL ) || in GetFCntDown()
1843 return LoRaMacCryptoGetFCntDown( *fCntID, macMsg->FHDR.FCnt, currentDown ); in GetFCntDown()
3115 LoRaMacStatus_t DetermineFrameType( LoRaMacMessageData_t* macMsg, FType_t* fType ) in DetermineFrameType() argument
3117 if( ( macMsg == NULL ) || ( fType == NULL ) ) in DetermineFrameType()
3142 if( ( macMsg->FHDR.FCtrl.Bits.FOptsLen > 0 ) && ( macMsg->FPort > 0 ) ) in DetermineFrameType()
3146 else if( macMsg->FRMPayloadSize == 0 ) in DetermineFrameType()
3150 else if( ( macMsg->FHDR.FCtrl.Bits.FOptsLen == 0 ) && ( macMsg->FPort == 0 ) ) in DetermineFrameType()
[all …]