Hi Emmanuel, On Thu, Dec 28, 2006 at 03:56:50PM +0100, Emmanuel Lecharny wrote:
> so far, OID parts are stored in java long, so into the interval [-2^63, > 2^63-1]. You can use up to 19 digits for an element of an OID, so your > sample won'ty be accepted. > > If you want to generate "random" OID, what I suggest is that you store 32 > bits values separated by a '.', like : > > 1.3.6.1.4.1.<myprivateOID>.0.<first 32 bits value>.<second 32 bits value>. > ... .<last 32 bits value>. Oh, I see. That's rather cumbersome and would clutter the structure a lot. Well, one's not supposed to parse the structure anyway... > Do also remember that, in LDAP, OID are used to declare new attribute types, > so creating arbitrary long OID does not make a lot of sense, but as I'm not > aware of all the possible use-cases... > > I would be very interested to know why you need such OID values. Well, I'd like to create an automated open-EIS to LDAP mapping. In open-EIS we've got so-called templates (which are basically RDBMS tables with lots of sugar and niceties like multi-language support etc.). A template has a uniqe name called GUID, e.g. "c4u_classic_email". To avoid having to assign a unique template OID for each open-EIS template (extending the data model etc.), I just took the template GUID (which consist of [a-zA-Z0-9_] and is up to 128 characters long) and converted it to a number. That way, the template GUID -> OID mapping is unique and I don't need a central registry (which is rather cumbersome because third parties may develop open-EIS modules themselves and currently, they don't need to tell us; then they'd need to apply for template OID, wait for it etc.). I'll try the 32-bits approach (BTW why 32 and not 42? ;-) ). > >is there any known limitation of OID size or the size of an OID part? > >I'm going to use auto-generated OIDs and they will look like: > >1.3.6.1.4.1 > >.<myprivateOID>.0.8228681198498217497059596.0.7212074495361812662326490325180684 > > > >The OID BNF grammar doesn't specify any limits, so I'm only wondering > >whether there are known real-life limits. Will performance be affected > >by these monsters? Thanks, Tino. -- www.quantenfeuerwerk.de www.spiritualdesign-chemnitz.de www.lebensraum11.de
