-
-
23 Sep 2016 19:43:20 UTC
- Distribution: Net-Interface
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (15)
- Testers (319 / 250 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (170.69KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Socket
- Test::More
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
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(); |; print NFe qq|@afs
@pfs
@ifs
@iffs |;
if (@iffIN6) { print NFe qq| @iffIN6 populated for BSD flavored systems
:all :afs :pfs :ifs :iffs :iffIN6 :iftype :scope
); |; } else { print NFe qq| :all :afs :pfs :ifs :iffs :iftype :scope
); |; } print NFe q| =head1 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_INET will 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";
|;
if (exists $fam{AF_INET6}) { print NFe q|On systems supporting IPV6, these additional symbols are available which may be applied to the address I<type> to determine the address attributes. IPV6_ADDR_ANY unknown IPV6_ADDR_UNICAST unicast IPV6_ADDR_MULTICAST multicast IPV6_ADDR_ANYCAST anycast IPV6_ADDR_LOOPBACK loopback IPV6_ADDR_LINKLOCAL link-local IPV6_ADDR_SITELOCAL site-local IPV6_ADDR_COMPATv4 compat-v4 IPV6_ADDR_SCOPE_MASK scope-mask IPV6_ADDR_MAPPED mapped IPV6_ADDR_RESERVED reserved IPV6_ADDR_ULUA uniq-lcl-unicast IPV6_ADDR_6TO4 6to4 IPV6_ADDR_6BONE 6bone IPV6_ADDR_AGU global-unicast IPV6_ADDR_UNSPECIFIED unspecified IPV6_ADDR_SOLICITED_NODE solicited-node IPV6_ADDR_ISATAP ISATAP IPV6_ADDR_PRODUCTIVE productive IPV6_ADDR_6TO4_MICROSOFT 6to4-ms IPV6_ADDR_TEREDO teredo IPV6_ADDR_ORCHID orchid IPV6_ADDR_NON_ROUTE_DOC non-routeable-doc if ($type & IPV6_ADDR_xxxx) { print IPV6_ADDR_xxxx,"\n"; }
These symbols may be equated to the scope of the address.
RFC2373_GLOBAL global-scope RFC2373_ORGLOCAL org-local RFC2373_SITELOCAL site-local RFC2373_LINKLOCAL link-local RFC2373_NODELOCAL loopback LINUX_COMPATv4 lx-compat-v4 if ($scope eq RFC2373_xxxx) { print RFC2373_xxxx,"\n"; }
|; }
print NFe q| =over 4
: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 |;
if (@iffIN6) { print NFe q| =item * :iffIN6 Import all IN6_IFF symbols (BSD flavors only) |; } if (exists $fam{AF_INET6}) { print NFe q| =item * :iftype Import all IPV6 type symbols
:scope Import all IPV6 scope symbols |; }
print NFe q| =back
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. |, $utxt, q| =head1 AUTHOR Michael Robinton <michael@bizsystems.com>
COPYRIGHT |. ((localtime())[5] +1900) .q|
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.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 748:
'=item' outside of any '=over'
- Around line 776:
You forgot a '=back' before '=head1'
- Around line 793:
You forgot a '=back' before '=head1'
Module Install Instructions
To install Net::Interface, copy and paste the appropriate command in to your terminal.
cpanm Net::Interface
perl -MCPAN -e shell install Net::Interface
For more information on module installation, please visit the detailed CPAN module installation guide.