File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / dsap / common / attrt_new.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

#include "quipu/util.h"
#include "quipu/name.h"

AttributeType AttrT_new (name)
register char * name;
{
oid_table * Current;
extern oid_table_attr attrOIDTable [];
oid_table_attr  *res;
extern attrNumEntries;
char * get_oid ();

	if ((res = name2attr (name)) == NULLTABLE_ATTR) {
		/* attribute not in tables, add as "ASN" if possible */
		char * ptr;
		OID oid;

		if ((ptr = get_oid (name)) == NULLCP) 
			return (NULLTABLE_ATTR);

		Current = &attrOIDTable[attrNumEntries].oa_ot;
		(void) strcpy (Current->ot_name, name);
		add_entry_aux (Current->ot_name,(caddr_t)&attrOIDTable[attrNumEntries],2,NULLCP);
		(void) strcpy (Current->ot_stroid,ptr);

		oid = str2oid (Current->ot_stroid);
		if (oid == NULLOID)
			Current->ot_oid = NULLOID;
		else
			Current->ot_oid = oid_cpy (oid);
		attrOIDTable[attrNumEntries].oa_syntax = 0;
		return (&attrOIDTable[attrNumEntries++]);
	}
	return (res);
}


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.