From da727875ac954b13ecb16521d255499511bb7424 Mon Sep 17 00:00:00 2001 From: mannol Date: Sun, 13 Oct 2013 16:16:47 +0200 Subject: tox A/V: RTP/MSI implementation --- toxrtp/toxrtp_error_id.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 toxrtp/toxrtp_error_id.h (limited to 'toxrtp/toxrtp_error_id.h') diff --git a/toxrtp/toxrtp_error_id.h b/toxrtp/toxrtp_error_id.h new file mode 100644 index 00000000..201aa936 --- /dev/null +++ b/toxrtp/toxrtp_error_id.h @@ -0,0 +1,32 @@ +#ifndef _RTP_ERROR_ID_ +#define _RTP_ERROR_ID_ + +#include "toxrtp_error.h" + +typedef enum error_s { + RTP_ERROR_PACKET_DROPED = 1, + RTP_ERROR_EMPTY_MESSAGE, + RTP_ERROR_STD_SEND_FAILURE, + RTP_ERROR_NO_EXTERNAL_HEADER, + RTP_ERROR_INVALID_EXTERNAL_HEADER, + RTP_ERROR_HEADER_PARSING, + RTP_ERROR_PAYLOAD_NULL, + RTP_ERROR_PAYLOAD_INVALID, + +} error_t; + + +/* Only needed to be called once */ +#ifndef REGISTER_RTP_ERRORS +#define REGISTER_RTP_ERRORS \ + t_rtperr_register( RTP_ERROR_PACKET_DROPED, "Ivalid sequence number, packet is late" ); \ + t_rtperr_register( RTP_ERROR_EMPTY_MESSAGE, "Tried to send an empty message" ); \ + t_rtperr_register( RTP_ERROR_STD_SEND_FAILURE, "Failed call function: sendto" ); \ + t_rtperr_register( RTP_ERROR_NO_EXTERNAL_HEADER, "While parsing external header" ); \ + t_rtperr_register( RTP_ERROR_INVALID_EXTERNAL_HEADER, "While parsing external header" ); \ + t_rtperr_register( RTP_ERROR_HEADER_PARSING, "While parsing header" ); \ + t_rtperr_register( RTP_ERROR_PAYLOAD_NULL, "Payload is NULL" ); \ + t_rtperr_register( RTP_ERROR_PAYLOAD_INVALID, "Invalid payload size" ); +#endif /* REGISTER_RTP_ERRORS */ + +#endif /* _RTP_ERROR_ID_ */ -- cgit v1.2.3