This file is indexed.

/usr/include/ug/if.h is in libdune-uggrid-dev 2.5.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/****************************************************************************/
/*                                                                          */
/* File:      if.h                                                          */
/*                                                                          */
/* Purpose:   include file for DDD interface module                         */
/*                                                                          */
/* Author:    Klaus Birken                                                  */
/*            Rechenzentrum Uni Stuttgart                                   */
/*            Universitaet Stuttgart                                        */
/*            Allmandring 30                                                */
/*            70550 Stuttgart                                               */
/*            internet: birken@rus.uni-stuttgart.de                         */
/*                                                                          */
/* History:   94/09/21 kb  extracted from if.c                              */
/*            96/01/16 kb  added DDD_OBJ shortcut to ifHead and ifAttr      */
/*                                                                          */
/* Remarks:                                                                 */
/*                                                                          */
/****************************************************************************/


#ifndef __DDD_IF_H__
#define __DDD_IF_H__


/****************************************************************************/
/*                                                                          */
/* auto include mechanism and other include files                           */
/*                                                                          */
/****************************************************************************/

#include "basic/memutil.h"



/****************************************************************************/
/*                                                                          */
/* defines in the following order                                           */
/*                                                                          */
/*        compile time constants defining static data size (i.e. arrays)    */
/*        other constants                                                   */
/*        macros                                                            */
/*                                                                          */
/****************************************************************************/

START_UGDIM_NAMESPACE

/*
   #define CtrlTimeouts
   #define CtrlTimeoutsDetailed
 */


/* maximum number of interfaces */
#define MAX_IF                  32


/* maximum length of interface description string */
#define IF_NAMELEN      80



enum CplDir {
  DirAB  =  0x01,
  DirBA  =  0x02,
  DirABA =  DirAB|DirBA
};





/* macros for easier coding of replicated source code */

/* loop over one interface (all ifHeads) */
#define ForIF(id,iter)  for((iter)=NS_DIM_PREFIX theIF[(id)].ifHead;  \
                            (iter)!=NULL;  \
                            (iter)=(iter)->next)


typedef DDD_OBJ IFObjPtr;



/****************************************************************************/
/*                                                                          */
/* data structures                                                          */
/*                                                                          */
/****************************************************************************/


/****************************************************************************/
/* IF_ATTR: single part of interface, all couplings have same attr          */
/****************************************************************************/

typedef struct if_attr
{
  struct if_attr *next;

  /* note: the cplXX resp. objXX arrays are NOT contiguous in memory */
  COUPLING   **cplAB, **cplBA, **cplABA;
  IFObjPtr   *objAB,  *objBA,  *objABA;       /* object shortcut */
  int nItems, nAB, nBA, nABA;
  DDD_ATTR attr;

} IF_ATTR;



/****************************************************************************/
/* IF_PROC: descriptor of message and its contents/buffers for IF-communic. */
/****************************************************************************/

typedef struct if_proc
{
  struct     if_proc *next;
  IF_ATTR    *ifAttr;
  int nAttrs;

  /* note: the cplXX resp. objXX arrays ARE contiguous in memory */
  COUPLING   **cpl, **cplAB, **cplBA, **cplABA;
  IFObjPtr   *obj,  *objAB,  *objBA,  *objABA;       /* object shortcut */
  int nItems, nAB, nBA, nABA;
  DDD_PROC proc;

  VChannelPtr vc;
  msgid msgIn;
  msgid msgOut;
  Buffer bufIn;
  Buffer bufOut;

} IF_PROC;



/****************************************************************************/
/* IF_DEF: descriptor for one single interface                              */
/****************************************************************************/

typedef struct if_def
{
  IF_PROC   *ifHead;
  COUPLING  **cpl;              /* list of couplings belonging to interface     */
  int nItems;                   /* overall number of items in this interface    */

  IFObjPtr  *obj;              /* shortcut: list of object addresses in interf */
  int objValid;                 /* flag: is obj-table valid?                    */

  int nIfHeads;

  int nObjStruct;
  int nPrioA;
  int nPrioB;
  DDD_TYPE O[16];
  DDD_PRIO A[16];
  DDD_PRIO B[16];

  /* data for efficiency tuning */
  int maskO;

  /* data for nice user interaction */
  char name[IF_NAMELEN+1];            /* string for interface identification */

} IF_DEF;



/****************************************************************************/
/*                                                                          */
/* definition of variables for corresponding module                         */
/*                                                                          */
/****************************************************************************/

extern IF_DEF theIF[MAX_IF];
extern int nIFs;



/****************************************************************************/
/*                                                                          */
/* function declarations                                                    */
/*                                                                          */
/****************************************************************************/


/* ifuse.c */
void    IFGetMem (IF_PROC *, size_t, int, int);
int     IFInitComm (DDD_IF);
void    IFExitComm (DDD_IF);
void    IFInitSend (IF_PROC *);
int     IFPollSend (DDD_IF);
char *  IFCommLoopObj (ComProcPtr, IFObjPtr *, char *, size_t, int);
char *  IFCommLoopCpl (ComProcPtr, COUPLING **, char *, size_t, int);
char *  IFCommLoopCplX (ComProcXPtr, COUPLING **, char *, size_t , int);
void    IFExecLoopObj (ExecProcPtr, IFObjPtr *, int);
void    IFExecLoopCplX (ExecProcXPtr, COUPLING **, int);
char *  IFCommHdrLoopCpl (ComProcHdrPtr, COUPLING **, char *, size_t, int);
char *  IFCommHdrLoopCplX (ComProcHdrXPtr, COUPLING **, char *, size_t, int);
void    IFExecHdrLoopCpl (ExecProcHdrPtr, COUPLING **, int);
void    IFExecHdrLoopCplX (ExecProcHdrXPtr, COUPLING **, int);


/* ifobjsc.c */
void IFCreateObjShortcut (DDD_IF);
void IFCheckShortcuts (DDD_IF);


/****************************************************************************/

END_UGDIM_NAMESPACE

#endif