Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /* atmsvc.h - ATM signaling kernel-demon interface definitions */
0003  
0004 /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
0005  
0006 
0007 #ifndef _LINUX_ATMSVC_H
0008 #define _LINUX_ATMSVC_H
0009 
0010 #include <linux/atmapi.h>
0011 #include <linux/atm.h>
0012 #include <linux/atmioc.h>
0013 
0014 
0015 #define ATMSIGD_CTRL _IO('a',ATMIOC_SPECIAL)
0016                 /* become ATM signaling demon control socket */
0017 
0018 enum atmsvc_msg_type { as_catch_null, as_bind, as_connect, as_accept, as_reject,
0019                as_listen, as_okay, as_error, as_indicate, as_close,
0020                as_itf_notify, as_modify, as_identify, as_terminate,
0021                as_addparty, as_dropparty };
0022 
0023 struct atmsvc_msg {
0024     enum atmsvc_msg_type type;
0025     atm_kptr_t vcc;
0026     atm_kptr_t listen_vcc;      /* indicate */
0027     int reply;          /* for okay and close:         */
0028                     /*   < 0: error before active      */
0029                     /*        (sigd has discarded ctx) */
0030                     /*   ==0: success          */
0031                         /*   > 0: error when active (still */
0032                     /*        need to close)       */
0033     struct sockaddr_atmpvc pvc; /* indicate, okay (connect) */
0034     struct sockaddr_atmsvc local;   /* local SVC address */
0035     struct atm_qos qos;     /* QOS parameters */
0036     struct atm_sap sap;     /* SAP */
0037     unsigned int session;       /* for p2pm */
0038     struct sockaddr_atmsvc svc; /* SVC address */
0039 } __ATM_API_ALIGN;
0040 
0041 /*
0042  * Message contents: see ftp://icaftp.epfl.ch/pub/linux/atm/docs/isp-*.tar.gz
0043  */
0044 
0045 /*
0046  * Some policy stuff for atmsigd and for net/atm/svc.c. Both have to agree on
0047  * what PCR is used to request bandwidth from the device driver. net/atm/svc.c
0048  * tries to do better than that, but only if there's no routing decision (i.e.
0049  * if signaling only uses one ATM interface).
0050  */
0051 
0052 #define SELECT_TOP_PCR(tp) ((tp).pcr ? (tp).pcr : \
0053   (tp).max_pcr && (tp).max_pcr != ATM_MAX_PCR ? (tp).max_pcr : \
0054   (tp).min_pcr ? (tp).min_pcr : ATM_MAX_PCR)
0055 
0056 #endif