#ifndef _SIP_MSG_ENCODE__H
#define	_SIP_MSG_ENCODE__H

#define _ALPHANUM_ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\0"
#define _RESERVED_ ";/?:@&=+$\0"
#define _MARK_ "-_.!~*'()\0"

#define _MARK__USER_UNRESERVED_ "-_.!~*'()&=+$,;?/\0"
#define _MARK__PWORD_UNRESERVED_ "-_.!~*'()&=+$,\0"
#define _MARK__URI_PARAM_UNRESERVED_ "-_.!~*'()[]/:&+$\0"
#define _MARK__HEADER_PARAM_UNRESERVED_ "-_.!~*'()[]/?:+$\0"

#define sip_is_alphanum(in) (  \
       (in >= 'a' && in <= 'z') || \
       (in >= 'A' && in <= 'Z') || \
       (in >= '0' && in <= '9'))

int sip_transport_encode_start_line(char *dest, SIP_API_STRUCT *sipApiMsg);
int sip_transport_encode_headers(char *dest, SIP_API_STRUCT *sipApiMsg);
int sip_transport_encode_body(char *dest, SIP_API_STRUCT *sipApiMsg);
int sip_transport_set_addr(struct sockaddr_in *dstAddr, SIP_API_STRUCT *sipApiMsg);
int sip_transport_set_sd_addr(struct sockaddr_in *dstAddr, SIP_TRANSPORT_ADDR *sipTransAddr);

#endif
