/*
This file is part of GNUnet.
- Copyright (C) 2013 GNUnet e.V.
+ Copyright (C) 2013-2016 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
struct GNUNET_MessageHeader header;
/**
- * Phone line to register.
+ * Always zero.
*/
- uint32_t line GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
+
+ /**
+ * Phone line / CADET port to register.
+ */
+ struct GNUNET_HashCode line_port;
};
struct GNUNET_MessageHeader header;
/**
- * CID, internal caller ID to identify which active call we are
- * talking about.
+ * CID, internal caller ID number used in the future to identify
+ * which active call we are talking about.
*/
uint32_t cid GNUNET_PACKED;
/**
- * Message Client <->Service to transmit the audio.
+ * Message Client <-> Service to transmit the audio.
*/
struct ClientAudioMessage
{
struct GNUNET_MessageHeader header;
/**
- * Which phone line to call at the peer?
+ * Always zero.
*/
- uint32_t line GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
/**
* Which peer is hosting the line?
*/
struct GNUNET_PeerIdentity target;
+ /**
+ * Which phone line to call at the peer?
+ */
+ struct GNUNET_HashCode line_port;
+
/**
* Identity of the caller.
*/
*/
struct GNUNET_MessageHeader header;
+ /**
+ * Call ID of the corresponding
+ * #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL
+ */
+ uint32_t cid GNUNET_PACKED;
+
};
/**
- * Cadet message for phone is ringing.
+ * Information signed in a `struct CadetPhoneRingMessage`
+ * whereby the caller self-identifies to the receiver.
*/
-struct CadetPhoneRingMessage
+struct CadetPhoneRingInfoPS
{
/**
- * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING
+ * Purpose for the signature, must be
+ * #GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING.
*/
- struct GNUNET_MessageHeader header;
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
/**
- * Desired target line.
+ * Which port did the call go to?
*/
- uint32_t remote_line GNUNET_PACKED;
+ struct GNUNET_HashCode line_port;
/**
- * Purpose for the signature.
+ * Which peer is the call for?
*/
- struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+ struct GNUNET_PeerIdentity target_peer;
/**
- * Who is calling us? (also who is signing).
+ * When does the signature expire?
*/
- struct GNUNET_CRYPTO_EcdsaPublicKey caller_id;
+ struct GNUNET_TIME_AbsoluteNBO expiration_time;
+};
+
+/**
+ * Cadet message to make a phone ring. Sent to the port
+ * of the respective phone.
+ */
+struct CadetPhoneRingMessage
+{
/**
- * Who are we calling?
+ * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING
*/
- struct GNUNET_PeerIdentity target;
+ struct GNUNET_MessageHeader header;
/**
- * From where are we calling?
+ * Always zero.
*/
- struct GNUNET_PeerIdentity source;
+ uint32_t reserved GNUNET_PACKED;
/**
- * When does the signature expire?
+ * Who is calling us? (also who is signing).
*/
- struct GNUNET_TIME_AbsoluteNBO expiration_time;
+ struct GNUNET_CRYPTO_EcdsaPublicKey caller_id;
/**
- * Signature on the above.
+ * When does the signature expire?
*/
- struct GNUNET_CRYPTO_EcdsaSignature signature;
+ struct GNUNET_TIME_AbsoluteNBO expiration_time;
/**
- * Source line for audio data in the other direction.
+ * Signature over a `struct CadetPhoneRingInfoPS`
*/
- uint32_t source_line GNUNET_PACKED;
+ struct GNUNET_CRYPTO_EcdsaSignature signature;
};
*/
struct GNUNET_MessageHeader header;
- /**
- * Target line on the receiving end.
- */
- uint32_t remote_line GNUNET_PACKED;
-
- /**
- * The source line sending this data
- */
- uint32_t source_line GNUNET_PACKED;
-
/* followed by audio data */
};