This file is indexed.

/usr/include/tilp2/dusb_vpkt.h is in libticalcs-dev 1.1.8+dfsg2-2.

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
/* Hey EMACS -*- linux-c -*- */
/* $Id: cmd84p.h 2074 2006-03-31 08:36:06Z roms $ */

/*  libticalcs - Ti Calculator library, a part of the TiLP project
 *  Copyright (C) 1999-2005  Romain LiƩvin
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software Foundation,
 *  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

// /!\ NOTE: for this file, backwards compatibility will not necessarily be maintained as strongly as it is for ticalcs.h !

#ifndef __DUSB_VPKT__
#define __DUSB_VPKT__

// Convenients structures

#define DUSB_DH_SIZE		(4+2)	// size + type

typedef struct
{
	uint32_t	size;		// virtual packet size
	uint16_t	type;		// virtual packet type

	uint8_t		*data;		// virtual packet data
} DUSBVirtualPacket;

typedef struct
{
	uint16_t	id;
	const char *name;
} DUSBVtlPktName;

// Virtual packet types

#define DUSB_VPKT_PING		0x0001
#define DUSB_VPKT_OS_BEGIN	0x0002
#define DUSB_VPKT_OS_ACK		0x0003
#define DUSB_VPKT_OS_HEADER	0x0004
#define DUSB_VPKT_OS_DATA	0x0005
#define DUSB_VPKT_EOT_ACK	0x0006
#define DUSB_VPKT_PARM_REQ	0x0007
#define DUSB_VPKT_PARM_DATA	0x0008
#define DUSB_VPKT_DIR_REQ	0x0009
#define DUSB_VPKT_VAR_HDR	0x000A
#define DUSB_VPKT_RTS		0x000B
#define DUSB_VPKT_VAR_REQ	0x000C
#define DUSB_VPKT_VAR_CNTS	0x000D
#define DUSB_VPKT_PARM_SET	0x000E
#define DUSB_VPKT_DEL_VAR	0x0010
#define DUSB_VPKT_EXECUTE	0x0011
#define DUSB_VPKT_MODE_SET	0x0012

#define DUSB_VPKT_DATA_ACK	0xAA00
#define DUSB_VPKT_DELAY_ACK	0xBB00
#define DUSB_VPKT_EOT		0xDD00
#define DUSB_VPKT_ERROR		0xEE00

// Functions

TIEXPORT3 DUSBVirtualPacket* TICALL dusb_vtl_pkt_new(uint32_t size, uint16_t type);
TIEXPORT3 void TICALL dusb_vtl_pkt_del(DUSBVirtualPacket* pkt);

TIEXPORT3 int TICALL dusb_send_buf_size_request(CalcHandle* h, uint32_t size);
TIEXPORT3 int TICALL dusb_recv_buf_size_alloc(CalcHandle* h, uint32_t *size);

TIEXPORT3 int TICALL dusb_recv_buf_size_request(CalcHandle* h, uint32_t *size);
TIEXPORT3 int TICALL dusb_send_buf_size_alloc(CalcHandle* h, uint32_t size);

TIEXPORT3 int TICALL dusb_send_data(CalcHandle* h, DUSBVirtualPacket* pkt);
TIEXPORT3 int TICALL dusb_recv_data(CalcHandle* h, DUSBVirtualPacket* pkt);

TIEXPORT3 int TICALL dusb_send_acknowledge(CalcHandle* h);
TIEXPORT3 int TICALL dusb_recv_acknowledge(CalcHandle *h);

TIEXPORT3 const char* TICALL dusb_vpkt_type2name(uint16_t id);

TIEXPORT3 uint32_t TICALL dusb_get_buf_size(void);

#endif