diff options
Diffstat (limited to 'usr.sbin/ppp/link.c')
-rw-r--r-- | usr.sbin/ppp/link.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/ppp/link.c b/usr.sbin/ppp/link.c index 42c5e0c..9cc1d51 100644 --- a/usr.sbin/ppp/link.c +++ b/usr.sbin/ppp/link.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link.c,v 1.9 1999/05/08 11:06:58 brian Exp $ + * $Id: link.c,v 1.10 1999/05/12 09:48:51 brian Exp $ * */ @@ -64,6 +64,7 @@ #include "pap.h" #include "chap.h" #include "cbcp.h" +#include "command.h" static void Despatch(struct bundle *, struct link *, struct mbuf *, u_short); @@ -339,3 +340,18 @@ Despatch(struct bundle *bundle, struct link *l, struct mbuf *bp, u_short proto) mbuf_Free(bp); } } + +int +link_ShowLayers(struct cmdargs const *arg) +{ + struct link *l = command_ChooseLink(arg); + int layer; + + for (layer = l->nlayers; layer; layer--) + prompt_Printf(arg->prompt, "%s%s", layer == l->nlayers ? "" : ", ", + l->layer[layer - 1]->name); + if (l->nlayers) + prompt_Printf(arg->prompt, "\n"); + + return 0; +} |