Decode/encode Address types other than IP and IP6
Decode/encode Address types other than IP and IP6

RFC 6733 defines the Diameter Address type as follows.

  4.3.1.  Common Derived AVP Data Formats

     Address

        The Address format is derived from the OctetString Basic AVP
        Format.  It is a discriminated union representing, for example, a
        32-bit (IPv4) [RFC0791] or 128-bit (IPv6) [RFC4291] address, most
        significant octet first.  The first two octets of the Address AVP
        represent the AddressType, which contains an Address Family,
        defined in [IANAADFAM].  The AddressType is used to discriminate
        the content and format of the remaining octets.

IP and IP6 are AddressType 1 and 2 respectively, but there are many more
defined in IANAADFAM, here:

  http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xhtml

None of these additional values were decoded/encoded in module
diameter_types. All were treated as errors.

The definition of other address families is spread across many different
documents, not all of which are easily accessible or even identified by
IANAADFAM, and the list can change. Given that the current decode has
been in place for over 10 years now (ie. this has clearly not been a big
problem), only provide a minimal decode of non-IP address families,
splitting them into a 2-tuple of unreserved 16-bit family and remaining
binary with no family-specific decode. Encode maps the 2-tuples back to
binary, and accepts address families 1 and 2 as well.

Note that even currently unassigned address families are decoded: only
the reserved values (0 and 65535) are treated as errors.

Decoding the binary to a 2-tuple at all is debatable since there's
hardly anything to gain over simply treating Address like OctetString,
with only validation that it contains an unreserved 2-octet AddressType,
but choose the tuple for consistency with the IP address decodes. It's
still possible to add family-specific decodes in the future with a
decode option, similar to the existing {string_decode, boolean()}.

bjorng/otp,g-andrade/otp,potatosalad/otp,rlipscombe/otp,vinoski/otp,g-andrade/otp,jj1bdx/otp,dumbbell/otp,erlang/otp,potatosalad/otp,dgud/otp,g-andrade/otp,emacsmirror/erlang,g-andrade/otp,dgud/otp,isvilen/otp,potatosalad/otp,dumbbell/otp,emacsmirror/erlang,rlipscombe/otp,potatosalad/otp,emacsmirror/erlang,g-andrade/otp,g-andrade/otp,erlang/otp,jj1bdx/otp,dgud/otp,rlipscombe/otp,mikpe/otp,mikpe/otp,erlang/otp,potatosalad/otp,g-andrade/otp,emacsmirror/erlang,dumbbell/otp,emacsmirror/erlang,mikpe/otp,bjorng/otp,bjorng/otp,erlang/otp,isvilen/otp,mikpe/otp,vinoski/otp,vinoski/otp,dgud/otp,bjorng/otp,vinoski/otp,jj1bdx/otp,mikpe/otp,emacsmirror/erlang,dgud/otp,bjorng/otp,jj1bdx/otp,mikpe/otp,dgud/otp,dumbbell/otp,g-andrade/otp,jj1bdx/otp,mikpe/otp,vinoski/otp,rlipscombe/otp,isvilen/otp,isvilen/otp,isvilen/otp,dgud/otp,jj1bdx/otp,dumbbell/otp,rlipscombe/otp,vinoski/otp,isvilen/otp,potatosalad/otp,dumbbell/otp,dumbbell/otp,isvilen/otp,g-andrade/otp,bjorng/otp,erlang/otp,dumbbell/otp,erlang/otp,bjorng/otp,mikpe/otp,rlipscombe/otp,mikpe/otp,emacsmirror/erlang,rlipscombe/otp,vinoski/otp,vinoski/otp,dgud/otp,bjorng/otp,erlang/otp,dumbbell/otp,jj1bdx/otp,potatosalad/otp,vinoski/otp,bjorng/otp,dgud/otp,potatosalad/otp,jj1bdx/otp,rlipscombe/otp,dumbbell/otp,erlang/otp,rlipscombe/otp,potatosalad/otp,isvilen/otp,jj1bdx/otp,bjorng/otp,vinoski/otp,dgud/otp,mikpe/otp,isvilen/otp,emacsmirror/erlang,g-andrade/otp,emacsmirror/erlang,erlang/otp,potatosalad/otp,isvilen/otp,erlang/otp,emacsmirror/erlang,jj1bdx/otp,rlipscombe/otp