#540 IPAddress lacks useful constructors: from prefix mask, nativ

Feature_Request
closed
Net (141)
5
2012-12-12
2012-06-28
No

A lot of the Poco network code is cluttered with casting of a "struct sockaddr" to a "struct sockaddr_in" or "struct sockaddr_in6". This adds a constructor that looks at the 'family' of the sockaddr and does the cast internally, invoking the appropriate constructor as needed.

It also adds IPv4 and IPv6 constructors which, given a mask length (<=32 and <=128, respectively) generate an address with the appropriate amount of subnet mask corresponding to that /nn prefix.

Discussion

  • Add prefix, native constructor, etc.

     
    Attachments
  • Alex Fabijanic
    Alex Fabijanic
    2012-12-12

    closing

     
  • Alex Fabijanic
    Alex Fabijanic
    2012-12-12

    • status: open --> closed