Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/cmd/dsslib/ip_t/ire.h
1810 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 2000-2011 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Glenn Fowler <[email protected]> *
18
* Phong Vo <[email protected]> *
19
* *
20
***********************************************************************/
21
#pragma prototyped
22
/*
23
* integer list regular expression interface
24
*
25
* Glenn Fowler
26
* AT&T research
27
*/
28
29
#ifndef _IRE_H
30
#define _IRE_H
31
32
#include <ast_common.h>
33
34
#define IRE_VERSION 20030115L /* interface version */
35
36
#define IRE_SET (~0) /* as path set marker */
37
38
#define ireinit(p) (memset(p,0,sizeof(*(p))),(p)->version=IRE_VERSION)
39
40
typedef uint32_t Ireint_t;
41
42
struct Ire_s; typedef struct Ire_s Ire_t;
43
struct Iredisc_s; typedef struct Iredisc_s Iredisc_t;
44
45
typedef void* (*Ireresize_f)(void*, void*, size_t);
46
47
struct Iredisc_s
48
{
49
unsigned long version; /* discipline version */
50
Error_f errorf; /* error function */
51
Ireresize_f resizef; /* alloc/free function */
52
void* resizehandle; /* resizef handle */
53
};
54
55
struct Ire_s /* RE handle */
56
{
57
const char* id; /* interface id */
58
int element; /* element size */
59
int dots; /* element dots */
60
int tuple; /* tuple size */
61
unsigned long group; /* embedded group mark */
62
#ifdef _IRE_PRIVATE_
63
_IRE_PRIVATE_
64
#endif
65
};
66
67
#if _BLD_bgp && defined(__EXPORT__)
68
#define extern __EXPORT__
69
#endif
70
71
extern Ire_t* irecomp(const char*, int, int, int, int, Iredisc_t*);
72
extern int ireexec(Ire_t*, void*, size_t);
73
extern int irefree(Ire_t*);
74
75
#undef extern
76
77
#endif
78
79