| 
 | 
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 a
    Length: 1367 (0x557)
    Types: TextFile
    Names: »asntest.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦697af93db⟧ »EurOpenD3/network/snmp/mit-snmp.tar.Z« 
        └─⟦57bbcbe75⟧ 
            └─⟦this⟧ »./asntest/asntest.c« 
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦925ee6880⟧ »EurOpenD3/network/snmp/mit-snmp.900225.tar.Z« 
        └─⟦a4bfa469c⟧ 
            └─⟦this⟧ »./asntest/asntest.c« 
/*
 *	$Header: asntest.c,v 1.1 89/01/11 22:11:49 jrd Exp $
 *	Author: J. Davin
 *	Copyright 1988, 1989, Massachusetts Institute of Technology
 *	See permission and disclaimer notice in file "notice.h"
 */
#include	<notice.h>
#include	<ctypes.h>
#include	<rdx.h>
#include	<debug.h>
#include	<asn.h>
int	main (argc, argv)
int	argc;
char	*argv [];
{
	AsnIdType		asn;
	AsnStatusType		status;
	CByteType		buf [ 512 ];
	CBytePtrType		cp;
	CIntfType		i;
	AsnLengthType		l;
	CUnslType		number;
	cp = buf;
	for (i = 1; i < (CIntfType) argc; i++) {
		(void) rdxDecodeAny (& number, argv [ i ]);
		*cp++ = (CByteType) number;
	}
	asn = asnNew ((AsnLanguageType) 0);
	status = asnStatusOk;
	cp = buf;
	for (i = 1; ((status == asnStatusOk) && (i < (CIntfType) argc)); i++) {
		status = asnDecode (asn, *cp);
		DEBUG2 ("%02.02X %d\n", (unsigned) *cp, status);
		cp++;
	}
	switch (status) {
	case asnStatusOk:
		DEBUG0 ("++OK\n");
		break;
	case asnStatusAccept:
		DEBUG0 ("++ACCEPT\n");
		break;
	case asnStatusReject:
		DEBUG0 ("++REJECT\n");
		break;
	case asnStatusBad:
		DEBUG0 ("++BAD\n");
		break;
	default:
		DEBUG0 ("++Panic\n");
		break;
	}
	l = asnEncode (asn, buf, (AsnLengthType) 512);
	cp = buf;
	for (i = (CIntfType) l; i > 0; i--) {
/*		DEBUG1 ("%02.02X ", *cp++);		*/
		DEBUG1 ("%d ", *cp++);
	}
	DEBUG0 ("\n");
	asn = asnFree (asn);
	exit (0);
}