I am trying to make a little wrapper for addrinfo (a network programming thing). Basically the structure addrinfo is like a list node

struct addrinfo
    ... stuff ...
    struct addrinfo * ai_next;
There is a function getaddrinfo( lpctstr, lpctstr, addrinfo *, addrinfo ** ) which will create a list of addrinfo's for a given host/port. And I need to free the list that is returned using freeaddrinfo( addrinfo * ) So basically, I'm wondering if it's possible for me to do something like:

struct caddrinfo { addrinfo t; }

class caddrinfolist


      getAddrInfo() { doin' a little manual work to convert their list to mine }
      freeAddrInfo() { freeaddrinfo(m_chain); } // obviously erraneous


      caddrinfo * chain;

Also, as a little tacked on question, to support unicode, I am just wrapping the structure ADDRINFOT. Should I instead have specializations of my wrapper for both addrinfo and addrinfoW?