rangetosubnet man page on SuSE

Man page or keyword search:  
man Server   14857 pages
apropos Keyword Search (all sections)
Output format
SuSE logo
[printable version]

IPSEC_RANGETOSUBNET(3)					IPSEC_RANGETOSUBNET(3)

NAME
       ipsec rangetosubnet - convert address range to subnet

SYNOPSIS
       #include <freeswan.h>

       const char *rangetosubnet(const ip_address *start,
	   const ip_address *stop, ip_subnet *dst);

DESCRIPTION
       Rangetosubnet  accepts  two IP addresses which define an address range,
       from start to stop inclusive, and converts this to a subnet  if	possi‐
       ble.   The addresses must both be IPv4 or both be IPv6, and the address
       family of the resulting subnet is the same.

       Rangetosubnet returns NULL for success and a pointer to	a  string-lit‐
       eral error message for failure; see DIAGNOSTICS.

SEE ALSO
       ipsec_initsubnet(3), ipsec_ttosubnet(3)

DIAGNOSTICS
       Fatal  errors  in  rangetosubnet	 are:  mixed address families; unknown
       address family; start and stop do not define a subnet.

HISTORY
       Written for the FreeS/WAN project by Henry Spencer.

BUGS
       The restriction of error reports to literal strings  (so	 that  callers
       don't  need to worry about freeing them or copying them) does limit the
       precision of error reporting.

       The error-reporting convention lends itself to slightly	obscure	 code,
       because	many  readers will not think of NULL as signifying success.  A
       good way to make it clearer is to write something like:

	      const char *error;

	      error = rangetosubnet( /* ... */ );
	      if (error != NULL) {
		      /* something went wrong */

				  8 Sept 2000		IPSEC_RANGETOSUBNET(3)
[top]

List of man pages available for SuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net