⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rangetosubnet.3

📁 This a good VPN source
💻 3
字号:
.TH IPSEC_RANGETOSUBNET 3 "8 Sept 2000".\" RCSID $Id: rangetosubnet.3,v 1.5 2004/04/09 18:00:36 mcr Exp $.SH NAMEipsec rangetosubnet \- convert address range to subnet.SH SYNOPSIS.B "#include <freeswan.h>".sp.B "const char *rangetosubnet(const ip_address *start,".ti +1c.B "const ip_address *stop, ip_subnet *dst);".SH DESCRIPTION.I Rangetosubnetaccepts two IP addresses which define an address range,from.I startto.I stopinclusive,and converts this to a subnet if possible.The addresses must both be IPv4 or both be IPv6,and the address family of the resulting subnet is the same..PP.I Rangetosubnetreturns NULL for success anda pointer to a string-literal error message for failure;see DIAGNOSTICS..SH SEE ALSOipsec_initsubnet(3), ipsec_ttosubnet(3).SH DIAGNOSTICSFatal errors in.I rangetosubnetare:mixed address families;unknown address family;.I startand.I stopdo not define a subnet..SH HISTORYWritten for the FreeS/WAN project by Henry Spencer..SH BUGSThe 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..PPThe error-reporting convention lends itselfto 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:.PP.RS.nf.B "const char *error;".sp.B "error = rangetosubnet( /* ... */ );".B "if (error != NULL) {".B "        /* something went wrong */".fi.RE

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -