aboutsummaryrefslogtreecommitdiff
path: root/src/org/gnunet/mesh/TunnelCreateMessage.java
blob: 7b63bc6a94f7e424f29263f5fbfd27239c5a768f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.gnunet.mesh;

import org.gnunet.construct.NestedMessage;
import org.gnunet.construct.UInt32;
import org.gnunet.construct.UnionCase;
import org.gnunet.util.GnunetMessage;
import org.gnunet.util.PeerIdentity;

/**
 * Message used to
 * a) request the service to create a new tunnel with the given tunnel id
 * b) notify the client of a newly created tunnel
 *
 * todo: this is bad design, split into two messages in the C code!
 *
 * @author Florian Dold
 */
@UnionCase(273)
public class TunnelCreateMessage implements GnunetMessage.Body {
    @UInt32
    public int tunnel_id;

    /**
     * Only present if sent from server to client (purpose b)
     */
    @NestedMessage(optional = true)
    public PeerIdentity otherEnd;
}