FGSSecurityModeCommand.c 477 Bytes
Newer Older
cucengineer's avatar
cucengineer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*! \file FGSSecurityModeCommand.c

*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

#include "FGSSecurityModeCommand.h"

int decode_fgs_security_mode_command(securityModeCommand_t *fgs_security_mode_com, uint8_t *buffer, uint32_t len)
{
  int decoded = 0;

  IES_DECODE_U8(buffer, decoded, fgs_security_mode_com->selectedNASsecurityalgorithms);

cucengineer's avatar
debug  
cucengineer committed
18
  fgs_security_mode_com->ngKSI = *(buffer + decoded) & 0x0f;
cucengineer's avatar
cucengineer committed
19 20 21 22 23
  decoded++;

  return decoded;

}