components/openssh/dtrace_sftp/sftp_provider.d
author Tomas Kuthan <tomas.kuthan@oracle.com>
Fri, 27 Jan 2017 14:23:05 -0800
branchs11u3-sru
changeset 7621 c11a68c3a63d
parent 7619 4e1d20a92c16
permissions -rw-r--r--
18127340 migrate the sftp dtrace provider feature from SunSSH to OpenSSH
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7619
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     1
/*
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     2
 * CDDL HEADER START
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     3
 *
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     5
 * Common Development and Distribution License (the "License").
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     6
 * You may not use this file except in compliance with the License.
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     7
 *
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    11
 * and limitations under the License.
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    12
 *
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    18
 *
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    19
 * CDDL HEADER END
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    20
 */
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    21
/*
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    22
 * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    23
 */
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    24
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    25
/*
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    26
 * We seem currently unable to depend properly on existing D libraries (like
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    27
 * sftp.d). But the definitions for conninfo_t and sftpinfo_t are stored there
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    28
 * (and have to be, since that's where the real translators live). So we're
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    29
 * forced to define something here to satisfy dtrace(1M), but none of the
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    30
 * definitions or translators here are actually used.
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    31
 */
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    32
typedef struct sftpinfo {
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    33
	int dummy;
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    34
} sftpinfo_t;
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    35
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    36
typedef struct sftpproto {
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    37
	int dummy;
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    38
} sftpproto_t;
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    39
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    40
typedef struct conninfo {
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    41
	int dummy;
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    42
} conninfo_t;
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    43
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    44
translator conninfo_t <sftpproto_t *dp> {
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    45
};
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    46
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    47
translator sftpinfo_t <sftpproto_t *dp> {
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    48
};
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    49
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    50
provider sftp {
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    51
	probe transfer__start(sftpproto_t *p) :
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    52
	    (conninfo_t *p, sftpinfo_t *p);
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    53
	probe transfer__done(sftpproto_t *p) :
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    54
	    (conninfo_t *p, sftpinfo_t *p);
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    55
};
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    56
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    57
#pragma D attributes Evolving/Evolving/ISA provider sftp provider
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    58
#pragma D attributes Private/Private/Unknown provider sftp module
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    59
#pragma D attributes Private/Private/Unknown provider sftp function
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    60
#pragma D attributes Private/Private/ISA provider sftp name
4e1d20a92c16 20459133 Backport 18127340 to S11.3: migrate the sftp dtrace provider feature from SunSSH
Tomas Kuthan <tomas.kuthan@oracle.com>
parents:
diff changeset
    61
#pragma D attributes Evolving/Evolving/ISA provider sftp args