This file is indexed.

/usr/include/capi_mod.h is in libcapi20-dev 1:3.27-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
/*
 * capi_mod.h
 *
 * Author	Jan-Michael Brummer
 * Author	Marco Zissen
 *
 * Copyright 2008  by Jan-Michael Brummer, Marco Zissen
 *
 * Author	Karsten Keil <kkeil@linux-pingi.de>
 *
 * Copyright 2011  by Karsten Keil <kkeil@linux-pingi.de>
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
 * version 2.1 as published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU LESSER GENERAL PUBLIC LICENSE for more details.
 *
 */

#ifndef CAPI_MOD_H
#define CAPI_MOD_H

#include "capi20.h"

/* define ulong if not defined */
#ifndef C_ULONG_DEFINED
typedef unsigned long ulong;
#endif

struct sModuleOperations {
	int ( *IsInstalled )( void );
	unsigned ( *Register )( unsigned nMaxB3Connection, unsigned nMaxB3Blks, unsigned nMaxSizeB3, unsigned *pnApplId );
	unsigned ( *Release )( int nHandle, int nApplId );
	unsigned ( *PutMessage )( int nHandle, unsigned nApplId, unsigned char *pnMessage );
	unsigned ( *GetMessage )( int nHandle, unsigned nApplId, unsigned char **ppnBuffer );
	unsigned char *( *GetManufactor )( int nHandle, unsigned nController, unsigned char *pnBuffer );
	unsigned char *( *GetVersion )( int nHandle, unsigned nController, unsigned char *pnBuffer );
	unsigned char *( *GetSerialNumber )( int nHandle, unsigned nController, unsigned char *pnBuffer );
	unsigned ( *GetProfile )( int nHandle, unsigned nController, unsigned char *pnBuffer );
	unsigned ( *waitformessage)(int nHandle, unsigned ApplID, struct timeval *TimeOut);
	/* The following parts are only used on the standard capi device */
	int ( *GetFlags )( unsigned nApplId, unsigned *pnFlagsPtr );
	int ( *SetFlags )( unsigned nApplId, unsigned nFlags );
	int ( *ClearFlags )( unsigned nApplId, unsigned nFlags );
	char *( *GetTtyDeviceName )( unsigned nApplId, unsigned nNcci, char *pnBuffer, size_t nSize );
	char *( *GetRawDeviceName )( unsigned nApplId, unsigned nNcci, char *pnBuffer, size_t nSize );
	int ( *GetNcciOpenCount )( unsigned nApplId, unsigned nNcci );
} __attribute__ ((packed));

struct sModule {
	char *pnName;
	int nVersion;
	void *pHandle;
	struct sModuleOperations *psOperations;
} __attribute__ ((packed));

unsigned char *capi_get_buffer( unsigned , size_t *, unsigned * );
void capi_save_datahandle(unsigned, unsigned, unsigned, unsigned);
unsigned capi_return_buffer(unsigned, unsigned);
void cleanup_buffers_for_ncci(unsigned, unsigned);
void cleanup_buffers_for_plci(unsigned, unsigned);
int capi_processMessage(unsigned char *, unsigned, unsigned, unsigned, int);

int capi_remember_applid(unsigned, int);
unsigned capi_alloc_applid(int);
void capi_freeapplid(unsigned);
int capi_validapplid(unsigned);
int capi_applid2fd(unsigned);

unsigned capi_return_buffer(unsigned applid, unsigned);

void CapiDebug(int nLevel, const char *pnFormat, ...);
unsigned short get_word( unsigned char **ppnPtr );
unsigned short get_netword( unsigned char **ppnPtr );
unsigned char *put_byte( unsigned char **ppnPtr, _cbyte nVal );
unsigned char *put_word( unsigned char **ppnPtr, _cword nVal );
unsigned char *put_dword( unsigned char **ppnPtr, _cdword nVal );
unsigned char *put_netword( unsigned char **ppnPtr, _cword nVal );

#define MODULE_LOADER_VERSION		2

#define MODULE_INIT( NAME, OPS )\
	int InitModule( struct sModule *psModule ) {\
		psModule -> pnName = strdup( NAME );\
		psModule -> nVersion = MODULE_LOADER_VERSION;\
		psModule -> psOperations = OPS;\
		return 0;\
	}

#endif