/* $Id: snmp.c,v 1.3 2000/03/14 22:40:49 jared Exp $ */

#include "config.h"

/* SNMP - The not so SIMPLE NETWORK MANAGMENT PROTOCOL */

/* This implements snmp per rfc1155 rfc1156 rfc1157 */

/* I'm putting my diagnoisis comments and development notes in here
   initally as I diagnose what these packets say */


/* strings are encoded as follows :

	CHAR len;
	char *string;
	where len = strlen(string)
	(unlike radius rfc2138, where len = sizeof(len)+sizeof(string))

 */

/* OIDs get some interesting translation done:
	.1.3.6.1.4.1.429.1.1.2.1.1.4.1000 =
	0x2B06010401832D01010201010487

	What happens is that when you have 429, which is 0x012d, you
        take that and convert it to binary, which becomes
	0000 0001 0010 1101

	Then, because 429 > 128, you encode it as follows:

	Byte 1:

		set high bit, so you have

		1000 0000

	Byte 2:

		this is the last byte, but only 7 bits of it,
		so you have this:

		0010 1101

	Then you take the 8th bit (if any) of the low end, and shift
	byte 1 left one bit, so you have
		1000 0010

	You add in the high bit of the byte 2 to byte 1, so you then
	have
		1000 0011

	which gives you the encoded oid of:

	0x832D for that part.
		
 */

#define ASN1_INT	0x02 /* 0x02, 0xYY where yy = int length */
#define ASN1_BITSTRING	0x03 /* 0x03, 0xYY where yy = string length */
#define ASN1_NULL	0x05 /* 0x05, 0x00 */
#define ASN1_OBJID	0x06 /* 0x06, 0xYY where yy = oid length */
#define ASN1_HDR	0x30 /* 0x30, 0xYY where yy = asn.1 pkt */
#define ASN1_UINT	0x43 /* 0x43, 0xYY where yy = Uint length */


struct snmp_data {
	unsigned long int request_id;

};


unsigned char *encode_oid(char *oid)
{
	char retoid[256];

}

