slac_session.c 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * void slac_session (struct session * session);
  11. *
  12. * slac.h
  13. *
  14. * print the SLAC session variable if the SLAC_SESSION bit is set
  15. * in the sesssion variable flagword;
  16. *
  17. * macro HEXSTRING is defined in memory.h and is used to reduce the
  18. * number of arguments one must type to invoke function hexstring;
  19. *
  20. *--------------------------------------------------------------------*/
  21. #ifndef SLAC_SESSION_SOURCE
  22. #define SLAC_SESSION_SOURCE
  23. #include <stdio.h>
  24. #include "../tools/memory.h"
  25. #include "../tools/error.h"
  26. #include "../tools/flags.h"
  27. #include "../slac/slac.h"
  28. void slac_session (struct session * session)
  29. {
  30. if (_anyset (session->flags, SLAC_SESSION))
  31. {
  32. char string [256];
  33. debug (0, __func__, "session.RunID %s", HEXSTRING (string, session->RunID));
  34. debug (0, __func__, "session.APPLICATION_TYPE %d", session->APPLICATION_TYPE);
  35. debug (0, __func__, "session.SECURITY_TYPE %d", session->SECURITY_TYPE);
  36. debug (0, __func__, "session.RESP_TYPE %d", session->RESP_TYPE);
  37. debug (0, __func__, "session.NUM_SOUNDS %d", session->NUM_SOUNDS);
  38. debug (0, __func__, "session.TIME_OUT %d", session->TIME_OUT);
  39. debug (0, __func__, "session.NumGroups %d", session->NumGroups);
  40. debug (0, __func__, "session.AAG %s", hexstring (string, sizeof (string), session->AAG, sizeof (session->AAG)));
  41. debug (0, __func__, "session.MSOUND_TARGET %s", HEXSTRING (string, session->MSOUND_TARGET));
  42. debug (0, __func__, "session.FORWARDING_STA %s", HEXSTRING (string, session->FORWARDING_STA));
  43. debug (0, __func__, "session.PEV_ID %s", HEXSTRING (string, session->PEV_ID));
  44. debug (0, __func__, "session.PEV_MAC %s", HEXSTRING (string, session->PEV_MAC));
  45. debug (0, __func__, "session.EVSE_ID %s", HEXSTRING (string, session->EVSE_ID));
  46. debug (0, __func__, "session.EVSE_MAC %s", HEXSTRING (string, session->EVSE_MAC));
  47. debug (0, __func__, "session.RND %s", HEXSTRING (string, session->RND));
  48. debug (0, __func__, "session.NMK %s", HEXSTRING (string, session->NMK));
  49. debug (0, __func__, "session.NID %s", HEXSTRING (string, session->NID));
  50. debug (0, __func__, "session.original_nmk %s", HEXSTRING (string, session->original_nmk));
  51. debug (0, __func__, "session.original_nid %s", HEXSTRING (string, session->original_nid));
  52. debug (0, __func__, "session.state %d", session->state);
  53. debug (0, __func__, "session.sounds %d", session->sounds);
  54. debug (0, __func__, "session.limit %d", session->limit);
  55. debug (0, __func__, "session.pause %d", session->pause);
  56. debug (0, __func__, "session.chargetime %d", session->chargetime);
  57. debug (0, __func__, "session.settletime %d", session->settletime);
  58. debug (0, __func__, "session.counter %d", session->counter);
  59. debug (0, __func__, "session.flags 0x%04X", session->flags);
  60. }
  61. return;
  62. }
  63. #endif