projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update clang-format
[oweals/gnunet.git]
/
src
/
conversation
/
conversation.h
diff --git
a/src/conversation/conversation.h
b/src/conversation/conversation.h
index aaeed1df3c82b127552641f29ba41ac32c17d57b..69f868e6c594d8d730bf446ef47a3be99a6517a4 100644
(file)
--- a/
src/conversation/conversation.h
+++ b/
src/conversation/conversation.h
@@
-1,21
+1,21
@@
/*
This file is part of GNUnet.
/*
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
- by the Free Software Foundation
; either version 3, or (at your
- option) any later version.
+ GNUnet is free software
: you can redistribute it and/or modify it
+
under the terms of the GNU Affero
General Public License as published
+ by the Free Software Foundation
, either version 3 of the License,
+ o
r (at your o
ption) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ SPDX-License-Identifier: AGPL3.0-or-later
*/
/**
*/
/**
@@
-39,6
+39,16
@@
extern "C"
#define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
#define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+/**
+ * Highest bit in a 32-bit unsigned integer,
+ * bit set if we are making an outgoing call,
+ * bit unset for local lines.
+ */
+#define HIGH_BIT ((uint32_t) (1LL << 31))
+
+GNUNET_NETWORK_STRUCT_BEGIN
+
+
/**
* Message to transmit the audio (between client and helpers).
*/
/**
* Message to transmit the audio (between client and helpers).
*/
@@
-65,9
+75,14
@@
struct ClientPhoneRegisterMessage
struct GNUNET_MessageHeader header;
/**
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;
};
};
@@
-82,8
+97,8
@@
struct ClientPhoneRingMessage
struct GNUNET_MessageHeader header;
/**
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;
*/
uint32_t cid GNUNET_PACKED;
@@
-173,7
+188,7
@@
struct ClientPhoneHangupMessage
/**
/**
- * Message Client <->Service to transmit the audio.
+ * Message Client <->
Service to transmit the audio.
*/
struct ClientAudioMessage
{
*/
struct ClientAudioMessage
{
@@
-204,15
+219,20
@@
struct ClientCallMessage
struct GNUNET_MessageHeader header;
/**
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 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.
*/
/**
* Identity of the caller.
*/
@@
-231,58
+251,74
@@
struct ClientPhonePickedupMessage
*/
struct GNUNET_MessageHeader header;
*/
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 CadetPhoneRing
Message
+struct CadetPhoneRing
InfoPS
{
/**
{
/**
- * 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
;
/**
/**
- * Wh
o is calling us? (also who is signing).
+ * Wh
en 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
;
/**
/**
- * Wh
en does the signature expire?
+ * Wh
o 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 signatur
e;
+ struct GNUNET_
TIME_AbsoluteNBO expiration_tim
e;
/**
/**
- * S
ource line for audio data in the other direction.
+ * S
ignature over a `struct CadetPhoneRingInfoPS`
*/
*/
-
uint32_t source_line GNUNET_PACKED
;
+
struct GNUNET_CRYPTO_EcdsaSignature signature
;
};
};
@@
-349,21
+385,13
@@
struct CadetAudioMessage
*/
struct GNUNET_MessageHeader header;
*/
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 */
};
/* followed by audio data */
};
+GNUNET_NETWORK_STRUCT_END
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#if 0 /* keep Emacsens' auto-indent happy */
{