blob: 76051d30e65ecd98e12c5c016ea921835aa3a607 (
plain)
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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SystemTap: I/O</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>I/O</h1>I/O functions.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga9" doxytag="io::STP_LOG_BUF_LEN"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__io.html#ga9">STP_LOG_BUF_LEN</a> 2047</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">private buffer for <a class="el" href="group__io.html#ga2">_stp_log()</a> <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__io.html#ga2">_stp_log</a> (const char *fmt,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Logs Data. <a href="#ga2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__io.html#ga7">_stp_netlink_open</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Opens netlink and relayfs connections to stpd. <a href="#ga7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__io.html#ga8">_stp_netlink_close</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Closes netlink and relayfs connections to stpd. <a href="#ga8"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
I/O functions.
<p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga2" doxytag="io.c::_stp_log"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void _stp_log </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>fmt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap> </td>
<td class="mdname" nowrap> <em>...</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Logs Data.
<p>
This function prints to the system log if stpd has not connected yet. Otherwise it sends the message immediately to stpd. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>fmt</em> </td><td>A variable number of args. </td></tr>
</table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>Lines are limited in length by printk buffer. If there is no newline in the format string, then other syslog output could get appended to the SystemTap line. </dd></dl>
<dl compact><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Evaluate if this function is necessary. </dd></dl>
<p>
Definition at line <a class="el" href="io_8c-source.html#l00029">29</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
<p>
References <a class="el" href="io_8c-source.html#l00016">STP_LOG_BUF_LEN</a>.
<p>
Referenced by <a class="el" href="map_8c-source.html#l00831">_stp_list_clear()</a>, <a class="el" href="probes_8c-source.html#l00034">_stp_register_jprobes()</a>, <a class="el" href="probes_8c-source.html#l00079">_stp_register_kprobes()</a>, <a class="el" href="stack_8c-source.html#l00171">_stp_stack_sprint()</a>, <a class="el" href="string_8c-source.html#l00042">_stp_string_init()</a>, <a class="el" href="probes_8c-source.html#l00020">_stp_unregister_jprobes()</a>, and <a class="el" href="probes_8c-source.html#l00065">_stp_unregister_kprobes()</a>. </td>
</tr>
</table>
<a class="anchor" name="ga8" doxytag="io.c::_stp_netlink_close"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void _stp_netlink_close </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Closes netlink and relayfs connections to stpd.
<p>
This must be called after all I/O is done, probably at the end of module cleanup. <dl compact><dt><b>Returns:</b></dt><dd>0 on success. -1 if there is a problem establishing a connection. </dd></dl>
<p>
Definition at line <a class="el" href="io_8c-source.html#l00103">103</a> of file <a class="el" href="io_8c-source.html">io.c</a>. </td>
</tr>
</table>
<a class="anchor" name="ga7" doxytag="io.c::_stp_netlink_open"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int _stp_netlink_open </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Opens netlink and relayfs connections to stpd.
<p>
This must be called before any I/O is done, probably at the start of module initialization.
<p>
Definition at line <a class="el" href="io_8c-source.html#l00087">87</a> of file <a class="el" href="io_8c-source.html">io.c</a>. </td>
</tr>
</table>
</body></html>
|