Commit Graph

3 Commits

Author SHA1 Message Date
Christian A. Lademann 1fcae023ff permissions corrected 1998-06-09 18:17:31 +00:00
Christian A. Lademann da3ee2bdab *** empty log message *** 1998-06-09 18:16:39 +00:00
Christian A. Lademann 9ca0e5aaf5 added the command "isdnctrl name ifdefaults": the named device is reset
to some reasonable defaults.

Internally, isdnctrl.c contains a list of functions (defs_fcns []), which
are called one after the other with the interface-name as a patameter.
Each function returns a char* to a string containing iscnctrl-commands
to be executed. Example:

char *
defs_budget(char *id) {
	static char	r [1024];
	char	*p = r;

	p += sprintf(p, "budget %s dial 10 1min\n", id);
	p += sprintf(p, "budget %s charge 100 1day\n", id);
	p += sprintf(p, "budget %s online 8hour 1day\n", id);

	return(r);
}

The advantage of this approach is, that even complex commands can be executed.

PS: The function defs_basic() in isdnctrl.c is not complete.
1998-06-09 18:11:36 +00:00