tncs.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * EAP-TNC - TNCS (IF-IMV and IF-TNCCS)
  3. * Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef TNCS_H
  15. #define TNCS_H
  16. struct tncs_data;
  17. struct tncs_data * tncs_init(void);
  18. void tncs_deinit(struct tncs_data *tncs);
  19. void tncs_init_connection(struct tncs_data *tncs);
  20. size_t tncs_total_send_len(struct tncs_data *tncs);
  21. u8 * tncs_copy_send_buf(struct tncs_data *tncs, u8 *pos);
  22. char * tncs_if_tnccs_start(struct tncs_data *tncs);
  23. char * tncs_if_tnccs_end(void);
  24. enum tncs_process_res {
  25. TNCCS_PROCESS_ERROR = -1,
  26. TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0,
  27. TNCCS_RECOMMENDATION_ERROR,
  28. TNCCS_RECOMMENDATION_ALLOW,
  29. TNCCS_RECOMMENDATION_NONE,
  30. TNCCS_RECOMMENDATION_ISOLATE,
  31. TNCCS_RECOMMENDATION_NO_ACCESS,
  32. TNCCS_RECOMMENDATION_NO_RECOMMENDATION
  33. };
  34. enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs,
  35. const u8 *msg, size_t len);
  36. int tncs_global_init(void);
  37. void tncs_global_deinit(void);
  38. #endif /* TNCS_H */