NAME
Net::Interface::NetSymbols - AF_ PF_ IFxxx type symbols
SYNOPSIS
This module is built for this specific architecture during the make process using inst/netsymbols.pl. Do not edit this module, edit inst/netsymbols.pl instead.
This module contains symbols arrays only for use by Net::Interface, in all other respects it is NOT functional. It contains documentation and data arrays for this specific architecture.
NOTE: WARNING !!
usage is Net::Interface
NOT Net::Interface::NetSymbols
use Net::Interface qw(
Net::Interface::NetSymbols::NI_ENDVAL();Net::Interface::NetSymbols::NI_UNIQUE();AF_UNSPEC AF_FILE AF_LOCAL AF_UNIX AF_INET AF_AX25 AF_IPX AF_APPLETALK AF_X25 AF_INET6 AF_ROSE AF_DECnet AF_PACKET AF_ROUTE AF_ASH AF_ECONET AF_MAX
PF_UNSPEC PF_FILE PF_LOCAL PF_UNIX PF_INET PF_AX25 PF_IPX PF_APPLETALK PF_X25 PF_INET6 PF_ROSE PF_DECnet PF_PACKET PF_ROUTE PF_ASH PF_ECONET PF_MAX
IFF_ALLMULTI IFF_AUTOMEDIA IFF_BROADCAST IFF_DEBUG IFF_DYNAMIC IFF_LOOPBACK IFF_MASTER IFF_MULTICAST IFF_NOARP IFF_NOTRAILERS IFF_POINTOPOINT IFF_PORTSEL IFF_PROMISC IFF_RUNNING IFF_SLAVE IFF_UP IFHWADDRLEN IFNAMSIZ IF_NAMESIZE
IFF_ALLMULTI IFF_AUTOMEDIA IFF_BROADCAST IFF_DEBUG IFF_DYNAMIC IFF_LOOPBACK IFF_MASTER IFF_MULTICAST IFF_NOARP IFF_NOTRAILERS IFF_POINTOPOINT IFF_PORTSEL IFF_PROMISC IFF_RUNNING IFF_SLAVE IFF_UP
:all :afs :pfs :ifs :iffs :iftype :scope
);
DESCRIPTION
All of the AF_XXX and PF_XXX symbols available in local "sys/socket.h" plus usual aliases for AF_LOCAL i.e. (AF_FILE AF_UNIX PF_LOCAL PF_FILE PF_UNIX)
All of the IFxxxx and IN6_IF symbols in "net/if.h, netinet/in.h, netinet/in_var.h" and their includes.
Symbols may be accessed for their numeric value or their string name.
i.e. if ($family == AF_INET)do something...or print AF_INETwill product the string "inet"
The same holds true for:
printf("family is %s",AF_INET);or sprint("family is %s",AF_INET);
To print the numeric value of the SYMBOL do:
print (0 + SYMBOL), "\n";
On systems supporting IPV6, these additional symbols are available which may be applied to the address type to determine the address attributes.
IPV6_ADDR_ANY unknownIPV6_ADDR_UNICAST unicastIPV6_ADDR_MULTICAST multicastIPV6_ADDR_ANYCAST anycastIPV6_ADDR_LOOPBACK loopbackIPV6_ADDR_LINKLOCAL link-localIPV6_ADDR_SITELOCAL site-localIPV6_ADDR_COMPATv4 compat-v4IPV6_ADDR_SCOPE_MASK scope-maskIPV6_ADDR_MAPPED mappedIPV6_ADDR_RESERVED reservedIPV6_ADDR_ULUA uniq-lcl-unicastIPV6_ADDR_6TO4 6to4IPV6_ADDR_6BONE 6boneIPV6_ADDR_AGU global-unicastIPV6_ADDR_UNSPECIFIED unspecifiedIPV6_ADDR_SOLICITED_NODE solicited-nodeIPV6_ADDR_ISATAP ISATAPIPV6_ADDR_PRODUCTIVE productiveIPV6_ADDR_6TO4_MICROSOFT 6to4-msIPV6_ADDR_TEREDO teredoIPV6_ADDR_ORCHID orchidIPV6_ADDR_NON_ROUTE_DOC non-routeable-docif ($type & IPV6_ADDR_xxxx) {print IPV6_ADDR_xxxx,"\n";}
These symbols may be equated to the scope of the address.
RFC2373_GLOBAL global-scopeRFC2373_ORGLOCAL org-localRFC2373_SITELOCAL site-localRFC2373_LINKLOCAL link-localRFC2373_NODELOCAL loopbackLINUX_COMPATv4 lx-compat-v4if ($scope eq RFC2373_xxxx) {print RFC2373_xxxx,"\n";}
- •
-
:all Import all symbols
- •
-
:afs Import all AF_XXX symbols
- •
-
:pfs Import all PF_XXX symbols
- •
-
:ifs Import all IFxxxx symbols
- •
-
:iffs Import all IFF symbols
- •
-
:iftype Import all IPV6 type symbols
- •
-
:scope Import all IPV6 scope symbols
non EXPORT functions
- •
-
Net::Interface::NetSymbols::NI_ENDVAL();
Reports the highest symbol value +1 of :all symbols above. Used for testing.
- •
-
Net::Interface::NetSymbols::NI_UNIQUE();
Returns a hash pointer to the AF_ or PF_ symbol values mapped to their character strings as defined for this architecture.
i.e.0 => 'PF_UNSPEC',1 => 'PF_LOCAL',2 => 'PF_INET',3 => 'PF_AX25',4 => 'PF_IPX',5 => 'PF_APPLETALK',9 => 'PF_X25',10 => 'PF_INET6',11 => 'PF_ROSE',12 => 'PF_DECnet',17 => 'PF_PACKET',18 => 'PF_ASH',19 => 'PF_ECONET',46 => 'PF_MAX',
AUTHOR Michael Robinton <[email protected]>
COPYRIGHT 2008-2009
Michael Robinton, all rights reserved.
This library is free software. You can distribute it and/or modify it under the same terms as Perl itself.