summaryrefslogtreecommitdiff
path: root/stun/stunagent.h
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.(none)>2008-06-19 15:54:22 -0400
committerYouness Alaoui <kakaroto@kakaroto.(none)>2008-06-19 15:54:22 -0400
commit3d0d5a9027a5e0a5dce209ef87e61a62383099b1 (patch)
tree70475a4b7cf0ab3b02bbec480884a4962fa143ce /stun/stunagent.h
parent59169ee7dbd7b70685c90baba2aafdf78758da5b (diff)
downloadlibnice-3d0d5a9027a5e0a5dce209ef87e61a62383099b1.tar.gz
Add a default validater function
Diffstat (limited to 'stun/stunagent.h')
-rw-r--r--stun/stunagent.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/stun/stunagent.h b/stun/stunagent.h
index 79a46ce..9ef0db8 100644
--- a/stun/stunagent.h
+++ b/stun/stunagent.h
@@ -84,10 +84,21 @@ struct stun_agent_t {
uint32_t usage_flags;
};
+typedef struct {
+ const uint8_t *username;
+ const size_t username_len;
+ const uint8_t *password;
+ const size_t password_len;
+} stun_validater_data;
+
+
typedef bool (*StunMessageIntegrityValidate) (StunAgent *agent,
StunMessage *message, uint8_t *username, uint16_t username_len,
uint8_t **password, size_t *password_len, void *user_data);
+bool stun_agent_default_validater (StunAgent *agent,
+ StunMessage *message, uint8_t *username, uint16_t username_len,
+ uint8_t **password, size_t *password_len, void *user_data);
void stun_agent_init (StunAgent *agent, const uint16_t *known_attributes,
StunCompatibility compatibility, uint32_t usage_flags);