mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
IPv6 support for chan_ooh323
IPv6 support for ooh323, bindaddr, peers and users ip can be IPv4 or IPv6 addr correction for multi-homed mode (0.0.0.0 or :: bindaddr) can work in dual 6/4 mode with :: bindaddr gatekeeper mode isn't supported in v6 mode while (issue #18278) Reported by: may213 Patches: ipv6-ooh323.patch uploaded by may213 (license 454) Review: https://reviewboard.asterisk.org/r/1004/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -81,7 +81,8 @@ typedef int OOSOCKET; /**< Socket's handle */
|
||||
* address. The least significant 8 bits represent the last number of the IP
|
||||
* address.
|
||||
*/
|
||||
typedef unsigned long OOIPADDR;
|
||||
/* typedef unsigned long OOIPADDR; */
|
||||
typedef struct ast_sockaddr OOIPADDR;
|
||||
|
||||
#define OOIPADDR_ANY ((OOIPADDR)0)
|
||||
#define OOIPADDR_LOCAL ((OOIPADDR)0x7f000001UL) /* 127.0.0.1 */
|
||||
@@ -115,7 +116,7 @@ typedef struct OOInterface{
|
||||
* negative return value is error.
|
||||
*/
|
||||
EXTERN int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
|
||||
OOIPADDR* destAddr, int* destPort);
|
||||
char* destAddr, int* destPort);
|
||||
|
||||
/**
|
||||
* This function converts an IP address to its string representation.
|
||||
@@ -177,10 +178,11 @@ EXTERN int ooSocketConnect (OOSOCKET socket, const char* host, int port);
|
||||
*
|
||||
* @param psocket The pointer to the socket's handle variable to receive
|
||||
* the handle of new socket.
|
||||
* @param family Which family socket will created
|
||||
* @return Completion status of operation: 0 (ASN_OK) = success,
|
||||
* negative return value is error.
|
||||
*/
|
||||
EXTERN int ooSocketCreate (OOSOCKET* psocket);
|
||||
EXTERN int ooSocketCreate (OOSOCKET* psocket, int family);
|
||||
|
||||
/**
|
||||
* This function creates a UDP datagram socket.
|
||||
@@ -190,7 +192,7 @@ EXTERN int ooSocketCreate (OOSOCKET* psocket);
|
||||
* @return Completion status of operation: 0 (ASN_OK) = success,
|
||||
* negative return value is error.
|
||||
*/
|
||||
EXTERN int ooSocketCreateUDP (OOSOCKET* psocket);
|
||||
EXTERN int ooSocketCreateUDP (OOSOCKET* psocket, int family);
|
||||
|
||||
/**
|
||||
* This function initiates use of sockets by an application. This function must
|
||||
@@ -351,7 +353,7 @@ EXTERN int ooPDWrite(struct pollfd *pfds, int nfds, int fd);
|
||||
* @return Completion status of operation: 0 (ASN_OK) = success,
|
||||
* negative return value is error.
|
||||
*/
|
||||
EXTERN int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr);
|
||||
/* EXTERN int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr); */
|
||||
|
||||
/**
|
||||
* This function converts an internet dotted ip address to network address
|
||||
@@ -364,7 +366,7 @@ EXTERN int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr);
|
||||
* @return Completion status of operation: 0 (ASN_OK) = success,
|
||||
* negative return value is error.
|
||||
*/
|
||||
EXTERN int ooSocketConvertIpToNwAddr(char *inetIp, unsigned char *netIp);
|
||||
/* EXTERN int ooSocketConvertIpToNwAddr(char *inetIp, unsigned char *netIp); */
|
||||
|
||||
/**
|
||||
* This function retrives the IP address of the local host.
|
||||
@@ -393,10 +395,11 @@ EXTERN short ooSocketHTONS(short val);
|
||||
* @param ip Buffer in which ip address will be returned.
|
||||
* @param len Length of the ip address buffer.
|
||||
* @param port Pointer to integer in which port number will be returned.
|
||||
* @param family Pointer to integer in which IP family (4 or 6) will be returned
|
||||
*
|
||||
* @return ASN_OK, on success; -ve on failed.
|
||||
*/
|
||||
EXTERN int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port);
|
||||
EXTERN int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, int *family);
|
||||
|
||||
|
||||
EXTERN int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList);
|
||||
|
||||
Reference in New Issue
Block a user