modules/rpsl/attribute.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
1 /******************
2 Copyright (c) 2002 RIPE NCC
3
4 All Rights Reserved
5
6 Permission to use, copy, modify, and distribute this software and its
7 documentation for any purpose and without fee is hereby granted,
8 provided that the above copyright notice appear in all copies and that
9 both that copyright notice and this permission notice appear in
10 supporting documentation, and that the name of the author not be
11 used in advertising or publicity pertaining to distribution of the
12 software without specific, written prior permission.
13
14 THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
16 AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
17 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
18 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 ***************************************/
21
22 #ifndef ATTRIBUTE_H
23 #define ATTRIBUTE_H
24
25 typedef struct {
26 char *name; /* "person", "descr", etc. */
27 int id; /* identifier for this attribute, e.g. A_RT,
28 A_NA, etc. */
29 char *altname; /* NULL, or "localas" for "local-as" */
30 char *xmlname; /* unique identifier for ambiguous attributes,
31 e.g. "members", "member-of", "status" */
32 char *code; /* "pn", "de", etc. */
33 int syntax_offset; /* index into syntax_tab[] of syntax */
34 int is_lookup; /* flag whether is a lookup attribute or not */
35 int is_inverse; /* flag whether is an inverse attribute or not */
36 int is_primary; /* flag whether is a primary key or not */
37 int is_list; /* flag whether is a list-valued attribute */
38 int is_ripe_list; /* flag whether is a RIPE-styled attribute */
39 char *foreign_code; /* code of attribute referenced, e.g. "mt" for
40 "mnt-by" or "mnt-lower" */
41 } attribute_t;
42
43 /* functions */
44 const attribute_t *attribute_lookup(const char *name, gboolean *is_ambiguous);
45 const attribute_t *attribute_lookup_by_offset(int offset);
46
47 #endif /* ATTRIBUTE_H */