/* ***************************************************************************** * * Copyright © 1996 Digital Equipment Corporation. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by Digital Equipment Corporation. The name of the * Corporation may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * ***************************************************************************** FACILITY: PPPD ABSTRACT: This module contains the prototypes for routines in PPPDUTIL_KERNEL.C that needed by PPPDUTIL.C. This is part of the user interface to the Point to Point (PPPD) Utility. AUTHOR: Iris Langstein Realmuto 21-December-1995 REVISION HISTORY: X-5 BWK005 Barry W. Kierstein 17-DEC-1996 Replaced the standard Digital copyright with one compatible with the CMU copyright. X-4 BWK004 Barry W. Kierstein 10-SEP-1996 Cleanup error handling, and make it more consistent with the rest of the code. Moved some function prototypes from PPPDUTIL_KERNEL.C here that are shared with PPPDUTIL.C, and properly defined the shared prototypes so that the header file can be included by both PPPDUTIL.C and PPPDUTIL_KERNEL.C. X-3 BWK003 Barry W. Kierstein 11-JUL-1996 Finished DIAL_OUT and HELP commands, fixed numerous bugs. X-2 BWK002 Barry W. Kierstein 14-MAY-1996 Implemented initial SHOW command and fixed numerous bugs. X-1 BWK001 Barry W. Kierstein 12-APR-1996 Initial check in of this module. */ /* Error handling data types and return macros */ #ifdef DEBUG_CODE typedef struct { char *context; VMS_STATUS status; } KERNEL_RETURN_STATUS_TYPE; #define KERNEL_CHECK_STATUS(context_str, context_code, status_code) \ { \ if FAILURE (status_code) \ { \ kernel_return_status.context = context_str; \ kernel_return_status.status = status_code; \ return (&kernel_return_status); \ } \ } #define KERNEL_ERROR_RETURN(context_str, context_code, status_code) \ { \ kernel_return_status.context = context_str; \ kernel_return_status.status = status_code; \ return (&kernel_return_status); \ } #define KERNEL_NORMAL_RETURN \ { \ kernel_return_status.context = NULL; \ kernel_return_status.status = SS$_NORMAL; \ return (&kernel_return_status); \ } #else typedef struct { VMS_STATUS context; VMS_STATUS status; } KERNEL_RETURN_STATUS_TYPE; #define KERNEL_CHECK_STATUS(context_str, context_code, status_code) \ { \ if FAILURE (status_code) \ { \ kernel_return_status.context = context_code; \ kernel_return_status.status = status_code; \ return (&kernel_return_status); \ } \ } #define KERNEL_ERROR_RETURN(context_str, context_code, status_code) \ { \ kernel_return_status.context = context_code; \ kernel_return_status.status = status_code; \ return (&kernel_return_status); \ } #define KERNEL_NORMAL_RETURN \ { \ kernel_return_status.context = (unsigned int) NULL; \ kernel_return_status.status = SS$_NORMAL; \ return (&kernel_return_status); \ } #endif /* Define the kernel return structure */ #ifdef PPPD_MAIN extern KERNEL_RETURN_STATUS_TYPE kernel_return_status; #else KERNEL_RETURN_STATUS_TYPE kernel_return_status; #endif /* Routines in common between PPPDUTIL.C and PPPDUTIL_KERNEL.C */ KERNEL_RETURN_STATUS_TYPE *disconnect_ppp_link(DEVICE_REC *current_device, PRIV *mask, PRIV *prev_priv); KERNEL_RETURN_STATUS_TYPE *get_ppp_items(DEVICE_REC *current_device, PRIV *mask, PRIV *prev_priv); mgmtRtns *init_ppp_mgmt_call_vector(void); KERNEL_RETURN_STATUS_TYPE *lock_pages(void); KERNEL_RETURN_STATUS_TYPE *set_ppp_items(DEVICE_REC *current_device, PRIV *mask, PRIV *prev_priv); KERNEL_RETURN_STATUS_TYPE *unlock_pages(void);