.\" Copyright (C) 2019 VirtualSquare. Project Leader: Renzo Davoli .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License, .\" as published by the Free Software Foundation, either version 2 .\" of the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, .\" MA 02110-1301 USA. .\" .\" generated with Ronn-NG/v0.8.0 .\" http://github.com/apjanke/ronn-ng/tree/0.8.0 .TH "LIBVDESLIRPCFG" "3" "December 2019" "VirtualSquare" .SH "NAME" vdeslirp_init, vdeslirp_setvprefix, vdeslirp_setvprefix6 \- simple API for slirp: configuration helpers .SH "SYNOPSIS" \fB#include \fR .P \fB#define VDE_INIT_DEFAULT 1\fR .P \fBvoid vdeslirp_init(SlirpConfig *\fR\fIcfg\fR\fB, int\fR \fIflags\fR\fB);\fR .P \fBvoid vdeslirp_setvprefix(SlirpConfig *\fR\fIcfg\fR\fB, int\fR \fIprefix\fR\fB);\fR .P \fBvoid vdeslirp_setvprefix6(SlirpConfig *\fR\fIcfg\fR\fB, int\fR \fIprefix6\fR\fB);\fR .P These functions are provided by libvdeslirp\. Link with \-lvdeslirp\. .SH "DESCRIPTION" These functions are configuration helpers for \fBlibvdeslirp\fR(3)\. The fields of the SlirpConfig has been described in the \fBlibvdeslirp\fR(3) manpage\. .P \fBvdeslirp_init\fR clears the \fBSlirpConfig\fR configuration structure \fBcfg\fR and sets the version number\. If \fBflags\fR is set to \fBVDE_INIT_DEFAULT\fR then it sets default values to all the fields of \fBcfg\fR\. These default values are suitable for most applications\. .IP "" 4 .nf SLIRP configuration version 1 ipv4\-enable 1 ipv4\-network 10\.0\.2\.0 ipv4\-netmask 255\.255\.255\.0 ipv4\-host 10\.0\.2\.2 ipv6\-enabled 1 ipv6\-prefix fd00:: ipv6\-preflen 64 ipv6\-host fd00::2 hostname slirp tftp\-servname (null) tftp\-path (null) bootfile (null) dhcp\-start 10\.0\.2\.15 ipv4\-vDNS 10\.0\.2\.3 ipv6\-vDNS fd00::3 vDNS\-search vdomainname (null) MTU(0=def) 0 MRU(0=def) 0 disable\-lback 0 enable\-emu 0 .fi .IP "" 0 .P The functions \fBvdeslirp_setvprefix\fR and \fBvdeslirp_setvprefix6\fR define the netmasks and prefixes for IPv4 and IPv6\. These function are usually called after the redefinition of \fBvhost\fR or \fBvhost6\fR\. \fBvdeslirp_setvprefix\fR redefines the network prefix of \fBvnetwork\fR, \fBvdhcp_start\fR and \fBvnameserver\fR while \fBvdeslirp_setvprefix6\fR redefines the network prefix for \fBvprefix_addr6\fR and \fBvnameserver6\fR\. .SH "SEE ALSO" \fBlibvdeslirp\fR(3) .SH "BUGS" Bug reports should be addressed to .SH "AUTHOR" VirtualSquare\. Project leader: Renzo Davoli\.