|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 3159 (0xc57) Types: TextFile Names: »massoc.py«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦e83f91978⟧ »EurOpenD22/isode/osimis-2.0.tar.Z« └─⟦d846658bd⟧ └─⟦this⟧ »osimis/msap/massoc.py«
-- -- Copyright (c) 1988 University College London -- 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 the Department of Computer Science, University College London. -- The name of the University 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. -- -- massoc.py - pepy source for user information in M-ASSOCIATE -- By George Pavlou, April 1990 CMIPAssoc { joint-iso-ccitt ms(9) cmip(1) version1(1) aAssociateUserInfo(1) } DEFINITIONS ::= %{ #include <stdio.h> #include <isode/rosap.h> #include "msap.h" %} PREFIXES encode decode print BEGIN ENCODER build CMIPUserInfo [[P struct MSAPassocinfo *]] ::= SEQUENCE { protocolVersion [0] IMPLICIT ProtocolVersion [[p &parm -> mai_protvrsn]] DEFAULT { version1 } << parm -> mai_protvrsn >>, functionalUnits [1] IMPLICIT FunctionalUnits [[p &parm -> mai_funits]] DEFAULT {} << parm -> mai_funits >>, accessControl [2] EXTERNAL [[p parm -> mai_access]] OPTIONAL << parm -> mai_access >>, userInfo [3] EXTERNAL [[p parm -> mai_info]] OPTIONAL << parm -> mai_info >> } ProtocolVersion [[P int *]] %{ char * cp = int2strb(*parm, 1); %} ::= BIT STRING [[x cp $ 1]] { version1 (0) } FunctionalUnits [[P int *]] %{ char * cp = int2strb(*parm, 5); %} ::= BIT STRING [[x cp $ 5]] { multipleObjectSelection (0), filter (1), multipleReply (2), extendedService (3), confirmedCancelGet (4) } DECODER parse CMIPUserInfo [[P struct MSAPassocinfo *]] ::= SEQUENCE { protocolVersion [0] IMPLICIT ProtocolVersion [[p &parm -> mai_protvrsn]] DEFAULT {version1 }, functionalUnits [1] IMPLICIT FunctionalUnits [[p &parm -> mai_funits]] DEFAULT {}, accessControl [2] EXTERNAL [[p &parm -> mai_access]] OPTIONAL, userInfo [3] EXTERNAL [[p &parm -> mai_info]] OPTIONAL } ProtocolVersion [[P int *]] %{ char * cp; int length; %} ::= BIT STRING [[x cp $ length]] { version1 (0) } %{ *parm = strb2int(cp, length); free(cp); %} FunctionalUnits [[P int *]] %{ char * cp; int length; %} ::= BIT STRING [[x cp $ length]] { multipleObjectSelection (0), filter (1), multipleReply (2), extendedService (3), confirmedCancelGet (4) } %{ *parm = strb2int(cp, length); free(cp); %} END %{ /* VARARGS2 */ static void advise (what, fmt, a, b, c, d, e, f, g, h, i, j) char *what, *fmt, *a, *b, *c, *d, *e, *f, *g, *h, *i, *j; { (void) fflush(stdout); (void) fprintf(stderr, "libmsap: "); (void) fprintf(stderr, fmt, a, b, c, d, e, f, g, h, i, j); if (what) (void) fputc(' ', stderr), perror(what); else (void) fputc('\n', stderr); (void) fflush(stderr); } %}