3932N/A/*
3932N/A * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
3932N/A */
3932N/A
3932N/A#pragma D depends_on library net.d
3932N/A
3932N/Atypedef struct ftpinfo {
3932N/A string fti_user; /* user name */
3932N/A string fti_cmd; /* FTP command */
3932N/A string fti_pathname; /* path of file being operated upon */
3932N/A uint64_t fti_nbytes; /* bytes transferred, if any */
3932N/A int fti_fd; /* fd for transfer, if any */
3932N/A} ftpinfo_t;
3932N/A
3932N/A/*
3932N/A * This structure must match the definition of same in ftp_provider_impl.h.
3932N/A */
3932N/Atypedef struct ftpproto {
3932N/A uint32_t ftp_user; /* user name */
3932N/A uint32_t ftp_cmd; /* FTP command */
3932N/A uint32_t ftp_pathname; /* path of file being operated upon */
3932N/A uint32_t ftp_raddr; /* remote address, as IPv6 address */
3932N/A uint32_t ftp_fd; /* fd for transfer, if any */
3932N/A uint32_t ftp_pad; /* padding for copyin() */
3932N/A uint64_t ftp_nbytes; /* bytes transferred, if any */
3932N/A} ftpproto_t;
3932N/A
3932N/A#pragma D binding "1.6.1" translator
3932N/Atranslator conninfo_t <ftpproto_t *f> {
3932N/A ci_protocol = "tcp";
3932N/A ci_remote = copyinstr((uintptr_t)
3932N/A *(uint32_t *)copyin((uintptr_t)&f->ftp_raddr, sizeof (uint32_t)));
3932N/A ci_local = "<unknown>";
3932N/A};
3932N/A
3932N/A#pragma D binding "1.6.1" translator
3932N/Atranslator ftpinfo_t <ftpproto_t *f> {
3932N/A fti_user = copyinstr((uintptr_t)
3932N/A *(uint32_t *)copyin((uintptr_t)&f->ftp_user, sizeof (uint32_t)));
3932N/A fti_cmd = copyinstr((uintptr_t)
3932N/A *(uint32_t *)copyin((uintptr_t)&f->ftp_cmd, sizeof (uint32_t)));
3932N/A fti_pathname = copyinstr((uintptr_t)
3932N/A *(uint32_t *)copyin((uintptr_t)&f->ftp_pathname,
3932N/A sizeof (uint32_t)));
3932N/A fti_nbytes =
3932N/A *(uint64_t *)copyin((uintptr_t)&f->ftp_nbytes, sizeof (uint64_t));
3932N/A fti_fd = *(uint32_t *)copyin((uintptr_t)&f->ftp_fd, sizeof (uint32_t));
3932N/A};