Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2001 - 2003, 2006 Pekka Riikonen
+ Copyright (C) 2001 - 2007 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define SILC_AUTH_PASSWORD 1 /* Passphrase authentication */
#define SILC_AUTH_PUBLIC_KEY 2 /* Public key authentication */
-/* Authentication protocol status message (used by all authentication
- protocols in the SILC). */
-#define SILC_AUTH_OK 0
-#define SILC_AUTH_FAILED 1
+/****d* silccore/SilcAuthAPI/SilcAuthResult
+ *
+ * NAME
+ *
+ * typedef SilcUInt32 SilcAuthResult;
+ *
+ * DESCRIPTION
+ *
+ * Authentication protocol status. Used by all authentication protocols
+ * in SILC.
+ *
+ * SOURCE
+ */
+typedef SilcUInt32 SilcAuthResult;
+
+#define SILC_AUTH_OK 0 /* Authentication successful */
+#define SILC_AUTH_FAILED 1 /* Authentication failed */
/***/
/****s* silccore/SilcAuthAPI/SilcAuthPayload
* SYNOPSIS
*
* SilcBuffer silc_key_agreement_payload_encode(char *hostname,
- * SilcUInt32 port);
+ * SilcUInt16 protocol,
+ * SilcUInt16 port);
*
* DESCRIPTION
*
- * Encodes the Key Agreement protocol and returns the encoded buffer
+ * Encodes the Key Agreement payload and returns the encoded buffer.
+ * The `protocol' is 0 for TCP and 1 for UDP.
*
***/
SilcBuffer silc_key_agreement_payload_encode(const char *hostname,
- SilcUInt32 port);
+ SilcUInt16 protocol,
+ SilcUInt16 port);
/****f* silccore/SilcAuthAPI/silc_key_agreement_payload_free
*
*
* DESCRIPTION
*
- * Frees the Key Agreement protocol and all data in it.
+ * Frees the Key Agreement payload and all data in it.
*
***/
void silc_key_agreement_payload_free(SilcKeyAgreementPayload payload);
***/
char *silc_key_agreement_get_hostname(SilcKeyAgreementPayload payload);
+/****f* silccore/SilcAuthAPI/silc_key_agreement_get_protocol
+ *
+ * SYNOPSIS
+ *
+ * SilcUInt16
+ * silc_key_agreement_get_protocol(SilcKeyAgreementPayload payload);
+ *
+ * DESCRIPTION
+ *
+ * Returns the protocol in the payload. The protocol is either TCP (0)
+ * or UDP (1).
+ *
+ ***/
+SilcUInt16 silc_key_agreement_get_protocol(SilcKeyAgreementPayload payload);
+
/****f* silccore/SilcAuthAPI/silc_key_agreement_get_port
*
* SYNOPSIS
*
- * SilcUInt32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
+ * SilcUInt16 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
*
* DESCRIPTION
*
* the SILC Key Exchange protocol.
*
***/
-SilcUInt32 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
+SilcUInt16 silc_key_agreement_get_port(SilcKeyAgreementPayload payload);
#endif