}
}
+ // TODO CGO: Initialize this from a real handshake.
+ circ->relay_cell_format = RELAY_CELL_FORMAT_V0;
+
if (onionskin_answer(circ,
&rpl.created_cell,
(const char*)rpl.keys, sizeof(rpl.keys),
hop->package_window = circuit_initial_package_window();
hop->deliver_window = CIRCWINDOW_START;
+ // TODO CGO: Initialize this from a real decision.
+ hop->relay_cell_format = RELAY_CELL_FORMAT_V0;
+
return 0;
}
/** Congestion control info */
struct congestion_control_t *ccontrol;
+ /** Format to use when exchanging relay cells with this relay. */
+ relay_cell_fmt_t relay_cell_format;
+
/*********************** Private members ****************************/
/** Private member: Cryptographic state used for encrypting and
/** RELAY_BEGIN and RELAY_RESOLVE cell bucket controlling how much can go on
* this circuit. Only used if this is the end of a circuit on an exit node.*/
token_bucket_ctr_t stream_limiter;
+
+ /** Format to use when exchanging relay cells with the client
+ * who built this circuit. */
+ relay_cell_fmt_t relay_cell_format;
};
#endif /* !defined(OR_CIRCUIT_ST_H) */
cpath = tor_malloc_zero(sizeof(crypt_path_t));
cpath->magic = CRYPT_PATH_MAGIC;
+ // TODO CGO: Pick relay cell format based on capabilities.
+ cpath->relay_cell_format = RELAY_CELL_FORMAT_V0;
+
if (cpath_init_circuit_crypto(cpath, (char*)keys, sizeof(keys),
is_service_side, 1) < 0) {
tor_free(cpath);