[asterisk-dev] AST_DATA_IPADDR is broken

Simon Perreault simon.perreault at viagenie.ca
Thu Nov 25 07:41:38 CST 2010


(Adding Mark Michelson in CC: to get his attention...)

On 2010-11-25 02:21, RAJNIKANT VANZA wrote:
> /usr/src/asterisk-1.8/asterisk-1.8.0/include/asterisk/data.h:233: error:
> field ‘AST_DATA_IPADDR’ has incomplete type

This is a bug that was introduced by the port to IPv6. Sorry about that.
I would encourage you to create a new entry in the bug tracker
(http://issues.asterisk.org).

Basically, we've broken AST_DATA_IPADDR. The breakage is caused by a
missing #include, so it's easy to fix. But there's a deeper issue:
AST_DATA_IPADDR can only represent IPv4 addresses. Should it be replaced
by something that uses ast_sockaddr underneath? From what I can tell,
AST_DATA_IPADDR is not used within Asterisk itself. This is why this bug
was not noticed before.

So I see three possibilities:

a. Add the missing #include to make AST_DATA_IPADDR work and move on.
b. Remove AST_DATA_IPADDR completely.
c. Replace AST_DATA_IPADDR with AST_DATA_SOCKADDR.

Anyone have an opinion?

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca



More information about the asterisk-dev mailing list