.\" Copyright (c) 2007 Renzo Davoli .\" .\" mstack manual page .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License, .\" version 2, as published by the Free Software Foundation. .\" .\" 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. .TH VIEW-OS 1 "April 23, 2008" "VIEW-OS: a process with a view" .SH NAME mstack \- networking stack selection .SH SYNOPSIS .B mstack [\fI-hv\fR] [\fI-o\fR protocol list] \fIstack_mountpoint\fR \fIcommand\fI .br .SH DESCRIPTION .PP In View-OS multiple networking stacks are available to processes at the same time. View-OS supports the \fBmsocket(2)\fR system call. mstack defines the default stack (for each address family) that is used when msocket refers to a NULL pathname for its stack. mstack provides also a backward compatibility for all the programs using the obsolete \fBsocket(2)\fR system call. The stack mountpoint identifies the stack. In ViewOS it is the mountpoint where the stack was mounted (by \fBmount(2)(8)\fR. In fact the call: .br "socket(domain,type,protocol)" .br is equivalent to: .br "msocket(NULL,domain,type protocol)" .br mstacks changes the default stack for the desired protocol families and executes the command (by \fBexecve(2)). .SH OPTIONS .IP "\fB\-h\fR" 4 prints the mstack command usage .IP "\fB\-v\fR" 4 sets the verbose mode on .IP "\fB\-o\fR" 4 defines the list of protocols. Without a -o option, mstack redefines the default stack for all protocols families. The list of protocols may include the a comma separated sequence of the following items: all, unix (or simply u), ipv4 (4), ipv6 (6), netlink (n), packet (p), bluetooth (b), irda (i), ip (which include all ip related protocols ipv4, ipv6, netlink and packet), #\fIn\fR where n is the number of protocol. Each item can be prefixed by + or - to specify whether the protocol/group of protocols must be added or removed from the set. .SH EXAMPLES .IP "\fBmstack /dev/net/lwip ip addr\fR" .br lists the address managed by the stack mounted on \fB/dev/net/lwip\fR. .IP "\fBexec mstack /dev/net/null bash\fR" .br disables the standard stack in a new bash (which overcomes the current one). .IP "\fBmstack -o ip /dev/net/lwip bash\fR" .br starts a new bash which uses the stack \fB/dev/net/lwip\fR for ipv4 and ipv6 but not for the other protocols. .IP "\fBmstack -o -unix /dev/net/lwip bash\fR" .br starts a new bash which uses the stack \fB/dev/net/lwip\fR for all protocols but AF_UNIX. .IP "\fBmstack -o +ip,-ipv6 /dev/net/lwip bash\fR" .br starts a new bash which uses the stack \fB/dev/net/lwip\fR for ipv4, netlink, packet but not ipv6. .SH SEE ALSO .BR umview(1), .BR kmview(1), .BR msocket(3), .BR umnetnative(9), .BR umnetnull(9), .BR umnetlwipv6(9), .BR unix(7), .BR ip(7), .BR ipv6(7), .BR netlink(7), .BR packet(7). .SH AUTHORS View-OS is a project of the Computer Science Department, University of Bologna. Project Leader: Renzo Davoli. .br Howto's and further information can be found on the project wiki .