summaryrefslogtreecommitdiffstats
path: root/man/tapset::socket.3stap
blob: 268332175ce8f6ef1a79c0db86ab88a9b37ea534 (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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
.\" -*- nroff -*-
.TH TAPSET::SOCKET 3stap "" "IBM"
.SH NAME
tapset::socket \- systemtap socket probe points

.\" macros
.de SAMPLE
.br
.RS
.nf
.nh
..
.de ESAMPLE
.hy
.fi
.RE
..

.SH DESCRIPTION

This family of probe points is used to probe socket activities.
It contains the following probe points:

.P
.TP
.B socket.send

Fires at the conclusion of sending a message on a socket.
This probe alias includes the
.B socket.sendmsg.return,
.B socket.aio_write.return
and
.B socket.writev.return
probes (these probes should
catch all messages sent on sockets).  The arguments supplied at the beginning
of the send are cached and made available in this probe.

.B Context:

The message sender.

.B Arguments:

.I name
    Name of this probe.

.I size
    Size of message sent (in bytes) or error code if success == 0

.I protocol
    Protocol used on the socket. Use sock_prot_num2str(protocol) 
    to convert to a string.

    Common values include:
         0 - IP (Internet Protocol, local interprocess communications)
         6 - TCP (Transmission Control Protocol)
        17 - UDP (User Datagram Protocol)
       132 - SCTP (Stream Control Transmission Protocol)

     Refer to /etc/protocols for a complete list of possible values.

.I family
    Protocol family of the socket (from include/linux/socket.h).
    Use sock_fam_num2str(family) to convert to a string.

    Possible values are:
        0  - UNSPEC (Unspecified)
        1  - LOCAL (Unix domain/local sockets)
        2  - INET (Internet Protocol (IP))
        3  - AX25 (Amateur Radio AX.25)
        4  - IPX (Novell IPX)
        5  - APPLETALK (AppleTalk DDP)
        6  - NETROM (Amateur Radio NET/ROM)
        7  - BRIDGE (Multiprotocol bridge)
        8  - ATMPVC (ATM PVCs)
        9  - X25 (X.25)
        10 - INET6 (IP version 6)
        11 - ROSE (Amateur Radio X.25 PLP)
        12 - DECNET (Reserved for DECnet project)
        13 - NETBEUI (Reserved for 802.2LLC project)
        14 - SECURITY (Security callback pseudo AF)
        15 - KEY (key management API)
        16 - NETLINK (Netlink protocol)
        17 - PACKET (Packet family)
        18 - ASH (Ash)
        19 - ECONET (Acorn Econet)
        20 - ATMSVC (ATM SVCs)
        22 - SNA (Linux SNA Project)
        23 - IRDA (IRDA sockets)
        24 - PPP0X (PPPoX sockets)
        25 - WANPIPE (Wanpipe API Sockets)
        26 - LLC (Linux LLC)
        30 - TIPC (TIPC sockets)
        31 - BLUETOOTH (Bluetooth sockets)

.I state
    State of the socket.  Use sock_state_num2str(state) to convert
    to a string.

    Possible values are:
        0 - FREE (not allocated)
        1 - UNCONNECTED (unconnected to any socket)
        2 - CONNECTING (in the process of connecting)
        3 - CONNECTED (connected to a socket)
        4 - DISCONNECTING (in the process of disconnecting)

.I flags
    Socket flags.  Use sock_flags_num2str(flags) to convert
    to a string.

    Possible values are:
        0 - ASYNC_NOSPACE
        1 - ASYNC_WAITDATA
        2 - NOSPACE
        3 - PASSCRED
        4 - PASSSEC

.I type
    Socket type.  Use sock_type_num2str(type) to convert
    to a string.

    Possible values are:
        1  - STREAM (stream connection socket)
        2  - DGRAM (datagram connectionless socket)
        3  - RAW (raw socket)
        4  - RDM (reliably-deliverd message)
        5  - SEQPACKET (sequential packet socket)
        6  - DCCP (datagram congestion control protocol socket)
        10 - PACKET (Linux-specific way of getting packets at device level)

.I success
    Was send successful?

    Possible values are:
        1 - Yes
        0 - No

.TP
.B socket.receive

Fires at the conclusion of receiving a message on a socket.
This probe alias includes the
.B socket.recvmsg.return,
.B socket.aio_read.return
and
.B socket.readv.return
probes (these probes should
catch all messages received on sockets).  The arguments supplied at
the beginning of the receive are cached and made available in this probe.

.B Context:

The message receiver.

.B Arguments:

Same as 
.B socket.send.

.TP
.B socket.sendmsg

Fires when the sock_sendmsg() kernel function is entered.

.B Context:

The message sender.

.B Arguments:

Same as 
.B socket.send,
with the following exceptions:

.I size

    Size of message being sent (in bytes).

.I success

    Not used.

.TP
.B socket.sendmsg.return

Fires when the sock_sendmsg() kernel function returns.

.B Context:

The message sender.

.B Arguments:

Same as 
.B socket.send

.TP
.B socket.recvmsg

Fires when the sock_recvmsg() kernel function is entered.

.B Context:

The message receiver.

.B Arguments:

Same as 
.B socket.receive,
with the following exceptions:

.I size

    Size of message being received (in bytes).

.I success

    Not used.

.TP
.B socket.recvmsg.return

Fires when the sock_recvmsg() kernel function returns.

.B Context:

The message receiver.

.B Arguments:

Same as 
.B socket.receive.






.TP
.B socket.aio_write

Fires when the sock_aio_write() kernel function is entered.

.B Context:

The message sender.

.B Arguments:

Same as
.B socket.send,
with the following exceptions:

.I size

    Size of message being sent (in bytes).

.I success

    Not used.

.TP
.B socket.aio_write.return

Fires when the sock_aio_write() kernel function returns.

.B Context:

The message sender.

.B Arguments:

Same as
.B socket.send.

.TP
.B socket.aio_read

Fires when the sock_aio_read() kernel function is entered.

.B Context:

The message receiver.

.B Arguments:

Same as 
.B socket.receive,
with the following exceptions:

.I size

    Size of message being received (in bytes).

.I success

    Not used.

.TP
.B socket.aio_read.return

Fires when the sock_aio_read() kernel function returns.

.B Context:

The message receiver.

.B Arguments:

Same as
.B socket.receive.

.TP
.B socket.writev

Fires when the sock_writev() kernel function is entered.

.B Context:

The message sender.

.B Arguments:

Same as
.B socket.send,
with the following exceptions:

.I size

    Size of message being sent (in bytes).

.I success

    Not used.

.TP
.B socket.writev.return

Fires when the sock_writev() kernel function returns.

.B Context:

The message sender.

.B Arguments:

Same as
.B socket.send.

.TP
.B socket.readv

Fires when the sock_readv() kernel function is entered.

.B Context:

The message receiver.

.B Arguments:

Same as 
.B socket.receive,
with the following exceptions:

.I size

    Size of message being received (in bytes).

.I success

    Not used.

.TP
.B socket.readv.return

Fires when the sock_readv() kernel function returns.

.B Context:

The message receiver.

.B Arguments:

Same as
.B socket.receive.

.TP
.B socket.create

Fires at the beginning of creating a socket.

.B Context:

The socket creator.

.B Arguments:

.I name
.br
.I protocol
.br
.I family
.br
.I type
    See 
.B socket.send.

.I requester
    Requester type.

    Possible values are:
        1 - kernel
        0 - user

.TP
.B socket.create.return

Fires at the end of creating a socket.

.B Context:

The socket creator.

.B Arguments:

Same as 
.B socket.create,
plus:

.I err
    Return code.

    Possible values are:
        0 - success
      < 0 - error

.I success
    Was the socket created successfully?

    Possible values are:
        1 - Yes
        0 - No
.TP
.B socket.close

Fires at the beginning of closing a socket.

.B Context:

The socket closer.

.B Arguments:

.I name
.br
.I protocol
.br
.I family
.br
.I state
.br
.I flags
.br
.I type
    See
.B socket.send.

.TP
.B socket.close.return

Fires at the end of closing a socket.

.B Context:

The socket closer.

.B Arguments:

.I name
    Name of this probe.

.SH SEE ALSO
.IR stap (1),
.IR stapprobes (3stap),
.IR stapfuncs (3stap)