Skip to content
Snippets Groups Projects
  • Sean Bright's avatar
    600c5d79
    res_pjproject: Add utility functions to convert between socket structures · 600c5d79
    Sean Bright authored
    Currently, to convert from a pj_sockaddr to an ast_sockaddr, the address
    needs to be rendered to a string and then parsed into the correct
    structure. This also involves a call to getaddrinfo(3). The same is true
    for the inverse operation.
    
    Instead, because we know the internal structure of both ast_sockaddr and
    pj_sockaddr, we can translate directly between the two without the
    need for an intermediate string.
    
    Change-Id: If0fc4bba9643f755604c6ffbb0d7cc46020bc761
    600c5d79
    History
    res_pjproject: Add utility functions to convert between socket structures
    Sean Bright authored
    Currently, to convert from a pj_sockaddr to an ast_sockaddr, the address
    needs to be rendered to a string and then parsed into the correct
    structure. This also involves a call to getaddrinfo(3). The same is true
    for the inverse operation.
    
    Instead, because we know the internal structure of both ast_sockaddr and
    pj_sockaddr, we can translate directly between the two without the
    need for an intermediate string.
    
    Change-Id: If0fc4bba9643f755604c6ffbb0d7cc46020bc761