This file is indexed.

/usr/include/freehdl/kernel-fhdl-stream.hh is in libfreehdl0-dev 0.0.8-2.2ubuntu2.

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
#ifndef FREEHDL_KERNEL_FHDL_STREAM_HH
#define FREEHDL_KERNEL_FHDL_STREAM_HH

#ifdef HAVE_SOCKET
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#endif
#include <string>
#include <iostream>

using namespace std;

struct fhdl_ostream_t {
  union {
    ostream *str;
    int fd;
  };
  bool active;
  bool socket_connection;

  fhdl_ostream_t();

  void bind_to_stream(ostream &os);
  void bind_to_socket(int s);

  void flush() {
    if (!socket_connection)
      str->flush();
  }

  fhdl_ostream_t &operator<<(char *p);
  fhdl_ostream_t &operator<<(const string &a);
  fhdl_ostream_t &operator<<(const int i);
  fhdl_ostream_t &operator<<(const unsigned int i);
  fhdl_ostream_t &operator<<(const long long int i);
};


struct fhdl_istream_t {
  union {
    istream *str;
    int fd;
  };
  bool active;
  bool socket_connection;

  fhdl_istream_t();

  void bind_to_stream(istream &is);
  void bind_to_socket(int s);
  
  bool eof() { return socket_connection? false : str->eof(); }

  fhdl_istream_t &operator>>(string &a);
  fhdl_istream_t &operator>>(int &i);
  fhdl_istream_t &operator>>(unsigned int &i);
  fhdl_istream_t &operator>>(long long int &i);

  void get(char *buf, const int size, const char sep);
};


// Error stream to output error messages generated by the kernel,
// e.g. to print error messages due to invalid simulator commands
// typed in by the user
extern fhdl_ostream_t kernel_error_stream;
// Normal output messages generated by the kernel code (e.g., to print
// signal values)
extern fhdl_ostream_t kernel_output_stream;
// Errors/notes printed by the model code (e.g., assert messages)
extern fhdl_ostream_t model_output_stream;
// Input stream 
extern fhdl_istream_t input_stream;

#ifdef HAVE_SOCKET
// Sockets addresses for socket based communication
extern struct sockaddr_un      serv_addr_kernel_error;
extern struct sockaddr_un      serv_addr_kernel_output;
extern struct sockaddr_un      serv_addr_model_output;
extern struct sockaddr_un      serv_addr_input;
#endif

#endif