X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccore%2Fsilcpacket.h;fp=lib%2Fsilccore%2Fsilcpacket.h;h=5dfcdc93edea59f70f69c4b473186c791e41fd8e;hb=6cda49040217e0a1a547cce09662dc683c38b3fd;hp=4cc2b44285d2bd37bfe1c0acb751cb1ce1a0e1da;hpb=b67ca8536041145da8bbd3138cb7df174bd0e71d;p=silc.git diff --git a/lib/silccore/silcpacket.h b/lib/silccore/silcpacket.h index 4cc2b442..5dfcdc93 100644 --- a/lib/silccore/silcpacket.h +++ b/lib/silccore/silcpacket.h @@ -377,6 +377,20 @@ silc_packet_engine_start(SilcRng rng, SilcBool router, ***/ void silc_packet_engine_stop(SilcPacketEngine engine); +/****f* silccore/SilcPacketAPI/silc_packet_engine_get_streams + * + * SYNOPSIS + * + * SilcDList silc_packet_engine_get_streams(SilcPacketEngine engine); + * + * DESCRIPTION + * + * Returns list of packet streams added to the packet engine. The caller + * must free the list with silc_dlist_uninit. + * + ***/ +SilcDList silc_packet_engine_get_streams(SilcPacketEngine engine); + /****f* silccore/SilcPacketAPI/silc_packet_stream_create * * SYNOPSIS @@ -474,6 +488,20 @@ SilcPacketStream silc_packet_stream_add_remote(SilcPacketStream stream, ***/ void silc_packet_stream_destroy(SilcPacketStream stream); +/****f* silccore/SilcPacketAPI/silc_packet_stream_is_valid + * + * SYNOPSIS + * + * SilcBool silc_packet_stream_is_valid(SilcPacketStream stream); + * + * DESCRIPTION + * + * Returns TRUE if the packet stream indicated by `stream' is valid and + * has not been disconnected or destroyed. + * + ***/ +SilcBool silc_packet_stream_is_valid(SilcPacketStream stream); + /****f* silccore/SilcPacketAPI/silc_packet_stream_set_router * * SYNOPSIS @@ -859,7 +887,7 @@ SilcBool silc_packet_get_keys(SilcPacketStream stream, * * DESCRIPTION * - * Set the source ID and destinaion ID to be used when sending packets to + * Set the source ID and destination ID to be used when sending packets to * this packet stream. The IDs to be used for a packet stream can be * overridden when sending packets. However, if the IDs do not ever change * for the packet stream it is recommended they are set using this function. @@ -871,6 +899,25 @@ SilcBool silc_packet_set_ids(SilcPacketStream stream, SilcIdType src_id_type, const void *src_id, SilcIdType dst_id_type, const void *dst_id); +/****f* silccore/SilcPacketAPI/silc_packet_set_ids + * + * SYNOPSIS + * + * SilcBool silc_packet_get_ids(SilcPacketStream stream, + * SilcBool *src_id_set, SilcID *src_id, + * SilcBool *dst_id_set, SilcID *dst_id); + * + * DESCRIPTION + * + * Returns source and destination IDs from the packet stream. The + * `src_id_set' is set to TRUE if the source ID was returned. The + * `dst_id_set' is set to TRUE if the destination ID was returned. + * + ***/ +SilcBool silc_packet_get_ids(SilcPacketStream stream, + SilcBool *src_id_set, SilcID *src_id, + SilcBool *dst_id_set, SilcID *dst_id); + /****f* silccore/SilcPacketAPI/silc_packet_set_sid * * SYNOPSIS