Fires at the conclusion of sending a message on a socket.
This probe alias includes the
-.B socket.sendmsg.return
+.B socket.sendmsg.return,
+.B socket.aio_write.return
and
-.B socket.do_write.return
-probes (these two probes should
+.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.
6 - DCCP (datagram congestion control protocol socket)
10 - PACKET (Linux-specific way of getting packets at device level)
-.I mflags
- Message type bitmap. Use msg_flags_num2str(flags) to convert
- to a string.
-
- Possible bit settings are:
- 0x01 - OOB
- 0x02 - PEEK
- 0x04 - DONTROUTE
- 0x08 - CTRUNC
- 0x10 - PROBE (Do not send. Only probe path f.e. for MTU)
- 0x20 - TRUNC
- 0x40 - DONTWAIT (Nonblocking IO)
- 0x80 - EOR (End of record)
- 0x100 - WAITALL (Wait for a full request)
- 0x200 - FIN
- 0x400 - SYN
- 0x800 - CONFIRM (Confirm path validity)
- 0x1000 - RST
- 0x2000 - ERRQUEUE (Fetch message from error queue)
- 0x4000 - NOSIGNAL (Do not generate SIGPIPE)
- 0x8000 - MORE (Sender will send more)
-
.I success
Was send successful?
Fires at the conclusion of receiving a message on a socket.
This probe alias includes the
-.B socket.recvmsg.return
+.B socket.recvmsg.return,
+.B socket.aio_read.return
and
-.B socket.do_read.return
-probes (these two probes should
+.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.
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.do_write
+.B socket.writev
-Fires when the do_sock_write() kernel function is entered.
+Fires when the sock_writev() kernel function is entered.
.B Context:
Not used.
.TP
-.B socket.do_write.return
+.B socket.writev.return
-Fires when the do_sock_write() kernel function returns.
+Fires when the sock_writev() kernel function returns.
.B Context:
.B socket.send.
.TP
-.B socket.do_read
+.B socket.readv
-Fires when the do_sock_read() kernel function is entered.
+Fires when the sock_readv() kernel function is entered.
.B Context:
Not used.
.TP
-.B socket.do_read.return
+.B socket.readv.return
-Fires when the do_sock_read() kernel function returns.
+Fires when the sock_readv() kernel function returns.
.B Context:
.SH SEE ALSO
.IR stap (1),
.IR stapprobes (5),
-.IR stapfuncs (5)
\ No newline at end of file
+.IR stapfuncs (5)
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
probe socket.send = socket.sendmsg.return,
- socket.do_write.return
+%( kernel_v < "2.6.19" %?
+ socket.writev.return,
+%)
+ socket.aio_write.return
{
name = "socket.send"
}
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
probe socket.receive = socket.recvmsg.return,
- socket.do_read.return
+%( kernel_v < "2.6.19" %?
+ socket.readv.return,
+%)
+ socket.aio_read.return
{
name = "socket.receive"
}
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
probe socket.sendmsg = kernel.function ("sock_sendmsg")
{
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
}
/*
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
probe socket.sendmsg.return = kernel.function ("sock_sendmsg").return
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
success = _success_check($return)
}
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
probe socket.recvmsg = kernel.function ("sock_recvmsg")
{
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
}
/*
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was receive successful? (1 = yes, 0 = no)
*/
probe socket.recvmsg.return = kernel.function ("sock_recvmsg").return
state = $sock->state
flags = $sock->flags
type = $sock->type
- mflags = $msg->msg_flags
success = _success_check($return)
}
/*
- * probe socket.do_write
+ * probe socket.aio_write
*
* Fires at the beginning of sending a message on a socket
- * via the do_sock_write() function
+ * via the sock_aio_write() function
*
* Context:
* The message sender
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
-probe socket.do_write = kernel.function ("do_sock_write")
+probe socket.aio_write = kernel.function ("sock_aio_write")
{
- name = "socket.do_write"
+ name = "socket.aio_write"
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ size = _get_sock_size ($iov, $nr_segs)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+}
+
+/*
+ * probe socket.aio_write.return
+ *
+ * Fires at the conclusion of sending a message on a socket
+ * via the sock_aio_write() function
+ *
+ * Context:
+ * The message receiver.
+ *
+ * Variables:
+ * name Name of this probe
+ * size Size of message received (in bytes) or
+ * error code if success = 0
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ * success Was receive successful? (1 = yes, 0 = no)
+ */
+probe socket.aio_write.return = kernel.function ("sock_aio_write").return
+{
+ name = "socket.aio_write.return"
+ size = $return
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ size = _get_sock_size ($iov, $nr_segs)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+ success = _success_check($return)
+}
+
+/*
+ * probe socket.aio_read
+ *
+ * Fires at the beginning of receiving a message on a socket
+ * via the sock_aio_read() function
+ *
+ * Context:
+ * The message sender
+ *
+ * Variables:
+ * name Name of this probe
+ * size Message size in bytes
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ */
+probe socket.aio_read = kernel.function ("sock_aio_read")
+{
+ name = "socket.aio_read"
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ size = _get_sock_size ($iov, $nr_segs)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+}
+
+/*
+ * probe socket.aio_read.return
+ *
+ * Fires at the conclusion of receiving a message on a socket
+ * via the sock_aio_read() function
+ *
+ * Context:
+ * The message receiver.
+ *
+ * Variables:
+ * name Name of this probe
+ * size Size of message received (in bytes) or
+ * error code if success = 0
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ * success Was receive successful? (1 = yes, 0 = no)
+ */
+probe socket.aio_read.return = kernel.function ("sock_aio_read").return
+{
+ name = "socket.aio_read.return"
+ size = $return
+ _sock = _get_sock_addr ($iocb->ki_filp)
+ protocol = _sock_prot_num (_sock)
+ family = _sock_fam_num (_sock)
+ state = _sock_state_num (_sock)
+ flags = _sock_flags_num (_sock)
+ type = _sock_type_num (_sock)
+ success = _success_check($return)
+}
+
+// readv and writev were removed in 2.6.19
+%( kernel_v < "2.6.19" %?
+/*
+ * probe socket.writev
+ *
+ * Fires at the beginning of sending a message on a socket
+ * via the sock_writev() function
+ *
+ * Context:
+ * The message sender
+ *
+ * Variables:
+ * name Name of this probe
+ * size Message size in bytes
+ * protocol Protocol value
+ * family Protocol family value
+ * state Socket state value
+ * flags Socket flags value
+ * type Socket type value
+ */
+probe socket.writev = kernel.function ("sock_writev")
+{
+ name = "socket.writev"
_sock = _get_sock_addr ($file)
size = _get_sock_size ($iov, $nr_segs)
protocol = _sock_prot_num (_sock)
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
}
/*
- * probe socket.do_write.return
+ * probe socket.writev.return
*
* Fires at the conclusion of sending a message on a socket
- * via the do_sock_write() function
+ * via the sock_writev() function
*
* Context:
* The message receiver.
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was send successful? (1 = yes, 0 = no)
*/
-probe socket.do_write.return = kernel.function ("do_sock_write").return
+probe socket.writev.return = kernel.function ("sock_writev").return
{
- name = "socket.do_write.return"
+ name = "socket.writev.return"
size = $return
_sock = _get_sock_addr ($file)
protocol = _sock_prot_num (_sock)
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
success = _success_check($return)
}
/*
- * probe socket.do_read
+ * probe socket.readv
*
* Fires at the beginning of receiving a message on a socket
- * via the do_sock_read() function
+ * via the sock_readv() function
*
* Context:
* The message sender
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
*/
-probe socket.do_read = kernel.function ("do_sock_read")
+probe socket.readv = kernel.function ("sock_readv")
{
- name = "socket.do_read"
+ name = "socket.readv"
_sock = _get_sock_addr ($file)
size = _get_sock_size ($iov, $nr_segs)
protocol = _sock_prot_num (_sock)
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
}
/*
- * probe socket.do_read.return
+ * probe socket.readv.return
*
* Fires at the conclusion of receiving a message on a socket
- * via the do_sock_read() function
+ * via the sock_readv() function
*
* Context:
* The message receiver.
* state Socket state value
* flags Socket flags value
* type Socket type value
- * mflags Message type value
* success Was receive successful? (1 = yes, 0 = no)
*/
-probe socket.do_read.return = kernel.function ("do_sock_read").return
+probe socket.readv.return = kernel.function ("sock_readv").return
{
- name = "socket.do_read.return"
+ name = "socket.readv.return"
size = $return
_sock = _get_sock_addr ($file)
protocol = _sock_prot_num (_sock)
state = _sock_state_num (_sock)
flags = _sock_flags_num (_sock)
type = _sock_type_num (_sock)
- mflags = $msg->msg_flags
success = _success_check($return)
}
+%)
/*
* probe socket.create
strlcpy (THIS->__retvalue, str, MAXSTRINGLEN);
%}
-
###########################
# INTERNAL MAPPING ARRAYS #
###########################