tncc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * EAP-TNC - TNCC (IF-IMC and IF-TNCCS)
  3. * Copyright (c) 2007, 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 TNCC_H
  15. #define TNCC_H
  16. struct tncc_data;
  17. struct tncc_data * tncc_init(void);
  18. void tncc_deinit(struct tncc_data *tncc);
  19. void tncc_init_connection(struct tncc_data *tncc);
  20. size_t tncc_total_send_len(struct tncc_data *tncc);
  21. u8 * tncc_copy_send_buf(struct tncc_data *tncc, u8 *pos);
  22. char * tncc_if_tnccs_start(struct tncc_data *tncc);
  23. char * tncc_if_tnccs_end(void);
  24. enum tncc_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. };
  32. enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc,
  33. const u8 *msg, size_t len);
  34. struct wpabuf * tncc_process_soh_request(int ver, const u8 *data, size_t len);
  35. #endif /* TNCC_H */