/* ***************************************************************************** * * 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 ASNDRIVER ABSTRACT: Define function prototypes for all the asn driver routines. The prototypes and linkages for the port driver jackets and the class driver emulation routines are defined in PPPD$ASN_LINKAGES.H. AUTHOR: Forrest A. Kenney 01-December-1995 REVISION HISTORY: X-1 BWK001 Barry W. Kierstein 17-DEC-1996 Replaced the standard Digital copyright with one compatible with the CMU copyright. */ /* Prototypes for driver routines in pppd$asndriver.c */ /* Driver table initialization routine */ int driver$init_tables (); /* Device I/O database structure initialization routine */ void asn$struc_init (CRB *crb, DDB *ddb, IDB *idb, ORB *orb, ASNUCB *asnucb); /* Device I/O database structure re-initialization routine */ void asn$struc_reinit (CRB *crb, DDB *ddb, IDB *idb, ORB *orb, ASNUCB *asnucb); /* Unit initialization routine */ int asn$unit_init (IDB *idb, ASNUCB *asnucb); void asn$unit_init_fork (uint64 fr3, uint64 fr4, ASNUCB *asnucb); /* Cloned UCB routine */ int asn$clone_ucb (ASNUCB *asnucb, DDT *ddt, PCB *pcb, ASNUCB *parent_ucb); /* Cancel I/O routine for asn$ driver */ void asn$cancelio (int chan, IRP *irp, PCB *pcb, ASNUCB *asnucb, int reason); /* Prototypes for driver routines in pppd$asnfdt.c */ /* FDT routine for read function */ int asn$read (IRP *irp, PCB *pcb, ASNUCB *asnucb, CCB *ccb); /* FDT routine for sense function */ int asn$sense (IRP *irp, PCB *pcb, ASNUCB *asnucb, CCB *ccb); /* FDT routine for set function */ int asn$set (IRP *irp, PCB *pcb, ASNUCB *asnucb, CCB *ccb); /* FDT routine for write function */ int asn$write (IRP *irp, PCB *pcb, ASNUCB *ucb, CCB *ccb); /* Define the prototypes for pppd$asnstrstp.c routines */ /* asn$read_done - complete a read request */ void asn$read_done(uint64 fr3, uint64 fr4, ASNRD *asnrd); /* asn$return_read_pkt - Decide what to do with read packet */ void asn$return_read_pkt(ASNUCB *asnucb, ASNRD *read_pkt); /* asn$validate_read_pkt - Validate a read packet */ int asn$validate_read_pkt(ASNUCB *asnucb, unsigned char *in_buffer, int in_length, unsigned char *out_buffer, int *ret_length); /* asn$read_startio - Start a read request */ void asn$read_startio(IRP *irp, ASNUCB *asnucb); /* asn$write_done - complete a write request */ void asn$write_done(uint64 fr3, uint64 fr4, ASNWRT *asnwrt); /* asn$write_startio - Start a write request */ void asn$write_startio(IRP *irp, ASNUCB *asnucb); /* Define the prototypes for pppd$asnmisc.c routines */ /* asn$cancel_active_io - Kills off current I/O requests */ void asn$cancel_active_io(ASNUCB *asnucb); /* asn$cancel_all_io - Kills off all pending and current I/O requests */ void asn$cancel_all_io(ASNUCB *asnucb); /* asn$delete_ucb - Delete ASN UCB */ void asn$delete_ucb(uint64 fr3, ASNUCB *asnucb, FKB *asnfkb); void asn$return_quota(PCB *pcb, ACB *acb); /* asn$do_sense_item - Get value for specified parameter */ int asn$do_sense_item (ASNUCB *asnucb, LSTITM *item, int trusted_flag); /* asn$do_set_item - Set specified parameter */ int asn$do_set_item (ASNUCB *asnucb, LSTITM *item); /* asn$enable_receive - Allow input to start */ int asn$enable_receive(ASNUCB *asnucb, TTY_UCB *phyucb); /* asn$fcs_check - Check received FCS is valid */ int asn$fcs_check(ASNUCB *asnucb, unsigned char *buffer, int length); /* asn$fcs_compute - Compute the FCS and save it in buffer */ int asn$fcs_compute(ASNUCB *asnucb, unsigned char *buffer, int length); /* asn$fcs16_compute - Compute 16 bit FCS */ unsigned short int asn$fcs16_compute(unsigned char *buffer, int length); /* asn$fcs32_compute - Compute 32 bit FCS */ unsigned int asn$fcs32_compute(unsigned char *buffer, int length); /* asn$fork_dispatch - Dispatch various fork requests */ void asn$fork_dispatch(uint64 fr3, uint64 fr4, ASNUCB *asnucb); /* asn$input_resume - resume reception of chracters */ void asn$input_resume(ASNUCB *asnucb); /* asn$input_stop - Stop receipt of chracters */ void asn$input_stop(ASNUCB *asnucb); /* asn$move_sense_data - Copy data from system data area to user bufer */ int asn$move_sense_data(char *src_buf, char *target_buf, int buf_len, int probe_flag); /* asn$prepare_for_delete - Get device ready to be deleted */ void asn$prepare_for_delete(ASNUCB *asnucb); /* asn$quote - Quote a buffer */ int asn$quote(ASNUCB *asnucb, unsigned char *in_char, int in_length, unsigned char *out_char, int out_length, int*ret_len); /* asn$unquote Remove quoting from a buffer */ int asn$unquote(unsigned char *in_char, int in_length, unsigned char *out_char); /* asn$write_start - Start a write request */ int asn$write_start(ASNUCB *asnucb, TTY_UCB *phyucb, IRP *irp); /* Define the prototypes for pppd$dynswitch.c routines */ /* dyn$revert - switch physical UCB back to TTDRIVER */ int dyn$revert(ASNUCB *asnucb); /* dyn$switch - switch physical terminal to ASNDRIVER from TTDRIVER */ int dyn$switch(ASNUCB *asnucb, struct dsc$descriptor *devname);