ua_securechannel_manager.h 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef UA_CHANNEL_MANAGER_H_
  2. #define UA_CHANNEL_MANAGER_H_
  3. #include "../deps/queue.h"
  4. #include "ua_server.h"
  5. #include "ua_securechannel.h"
  6. #include "ua_util.h"
  7. typedef struct UA_SecureChannelManager {
  8. LIST_HEAD(channel_list, channel_list_entry) channels; // doubly-linked list of channels
  9. UA_Int32 maxChannelCount;
  10. UA_DateTime maxChannelLifetime;
  11. UA_MessageSecurityMode securityMode;
  12. UA_DateTime channelLifeTime;
  13. UA_Int32 lastChannelId;
  14. UA_UInt32 lastTokenId;
  15. } UA_SecureChannelManager;
  16. UA_StatusCode UA_SecureChannelManager_init(UA_SecureChannelManager *cm, UA_UInt32 maxChannelCount,
  17. UA_UInt32 tokenLifetime, UA_UInt32 startChannelId,
  18. UA_UInt32 startTokenId);
  19. void UA_SecureChannelManager_deleteMembers(UA_SecureChannelManager *cm);
  20. UA_StatusCode UA_SecureChannelManager_open(UA_SecureChannelManager *cm, UA_Connection *conn,
  21. const UA_OpenSecureChannelRequest *request,
  22. UA_OpenSecureChannelResponse *response);
  23. UA_StatusCode UA_SecureChannelManager_renew(UA_SecureChannelManager *cm, UA_Connection *conn,
  24. const UA_OpenSecureChannelRequest *request,
  25. UA_OpenSecureChannelResponse *response);
  26. UA_SecureChannel * UA_SecureChannelManager_get(UA_SecureChannelManager *cm, UA_UInt32 channelId);
  27. UA_StatusCode UA_SecureChannelManager_close(UA_SecureChannelManager *cm, UA_UInt32 channelId);
  28. #endif /* UA_CHANNEL_MANAGER_H_ */