Attached is a patch adding following functions:
inet(text), cidr(text): convert a text value into inet/cidrset_masklen(inet): set masklen on the inet value
Patch also contains regression checks for these functions.
-alex