Buy in rfe3561826/bug32/pbz5668 code to add an %h macro to up/downs

This commit is contained in:
mtbishop 2013-07-07 20:36:33 +00:00
parent cb0f55381a
commit 59e5f82dc7
6 changed files with 13 additions and 8 deletions

View File

@ -15,7 +15,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# $Id: Makefile.in,v 1.11.2.6 2012/07/09 04:55:38 mtbishop Exp $ # $Id: Makefile.in,v 1.11.2.7 2013/07/07 20:36:44 mtbishop Exp $
# #
CC = @CC@ CC = @CC@
CFLAGS = @CFLAGS@ @CPPFLAGS@ CFLAGS = @CFLAGS@ @CPPFLAGS@
@ -73,7 +73,7 @@ depend:
makedepend -- $(CFLAGS) -- *.c makedepend -- $(CFLAGS) -- *.c
clean: clean:
rm -f core cfg_file.tab.* cfg_file.lex.* *.o *~ *.bak vtund rm -f core cfg_file.tab.* cfg_file.lex.* *.o *~ .#* *.bak vtund
distclean: clean distclean: clean
rm -f $(CONFIGURE_FILES) rm -f $(CONFIGURE_FILES)

View File

@ -18,7 +18,7 @@
*/ */
/* /*
* $Id: cfg_file.y,v 1.8.2.6 2012/07/09 01:01:08 mtbishop Exp $ * $Id: cfg_file.y,v 1.8.2.7 2013/07/07 20:36:33 mtbishop Exp $
*/ */
#include "config.h" #include "config.h"
@ -107,6 +107,7 @@ statement: '\n'
memcpy(parse_host, &default_host, sizeof(struct vtun_host)); memcpy(parse_host, &default_host, sizeof(struct vtun_host));
parse_host->host = strdup($1); parse_host->host = strdup($1);
parse_host->passwd = NULL; parse_host->passwd = NULL;
parse_host->sopt.host = strdup($1);
/* Copy local address */ /* Copy local address */
copy_addr(parse_host, &default_host); copy_addr(parse_host, &default_host);

View File

@ -17,14 +17,14 @@
*/ */
/* /*
* $Id: driver.h,v 1.4.2.2 2008/01/07 22:35:30 mtbishop Exp $ * $Id: driver.h,v 1.4.2.3 2013/07/07 20:36:37 mtbishop Exp $
*/ */
#ifndef _DRIVER_H #ifndef _DRIVER_H
#define _DRIVER_H #define _DRIVER_H
/* Definitions for device and protocol drivers /* Definitions for device and protocol drivers
* Interface will be completely rewritten in * Interface will be completely rewritten in
* version 3.0 * future versions.
*/ */
extern int (*dev_write)(int fd, char *buf, int len); extern int (*dev_write)(int fd, char *buf, int len);

3
vtun.h
View File

@ -17,7 +17,7 @@
*/ */
/* /*
* $Id: vtun.h,v 1.12.2.7 2012/07/09 01:01:08 mtbishop Exp $ * $Id: vtun.h,v 1.12.2.8 2013/07/07 20:36:56 mtbishop Exp $
*/ */
#ifndef _VTUN_H #ifndef _VTUN_H
@ -51,6 +51,7 @@ struct vtun_sopt {
int lport; int lport;
char *raddr; char *raddr;
int rport; int rport;
char *host;
}; };
struct vtun_stat { struct vtun_stat {

View File

@ -6,7 +6,7 @@
# Ted Rolle <ted@acacia.datacomm.com> # Ted Rolle <ted@acacia.datacomm.com>
# #
# Configuration file example # Configuration file example
# $Id: vtund.conf,v 1.4.2.5 2012/07/07 07:14:17 mtbishop Exp $ # $Id: vtund.conf,v 1.4.2.6 2013/07/07 20:36:48 mtbishop Exp $
# #
# #
# Lines which begin with '#' are comments # Lines which begin with '#' are comments
@ -227,6 +227,7 @@
# %P - Local TCP or UDP port # %P - Local TCP or UDP port
# %a - Remote IP address # %a - Remote IP address
# %p - Remote TCP or UDP port # %p - Remote TCP or UDP port
# %h - Host Profile Name in config
# #
# wait - Wait for the program termination. # wait - Wait for the program termination.
# #

View File

@ -1,5 +1,5 @@
.\" Manual page for vtund.conf .\" Manual page for vtund.conf
.\" $Id: vtund.conf.5,v 1.4.2.4 2012/07/07 07:14:17 mtbishop Exp $ .\" $Id: vtund.conf.5,v 1.4.2.5 2013/07/07 20:36:52 mtbishop Exp $
.TH VTUND.CONF 5 .TH VTUND.CONF 5
.SH NAME .SH NAME
@ -315,6 +315,8 @@ Special characters that can be used inside \fIarguments\fR parameter:
\fB%a\fR - Remote IP address \fB%a\fR - Remote IP address
.br .br
\fB%p\fR - Remote TCP or UDP port \fB%p\fR - Remote TCP or UDP port
.br
\fB%h\fR - Host profile name
.IP \fBppp\ \fIarguments\fR .IP \fBppp\ \fIarguments\fR
run program specified by \fBppp\fR statement in \fBoptions\fR section. run program specified by \fBppp\fR statement in \fBoptions\fR section.
All special character described above are valid in \fIarguments\fR here. All special character described above are valid in \fIarguments\fR here.