Cross Reference: ftp_provider_impl.h
xref
: /
solaris-userland
/
components
/
proftpd
/
dtrace
/
ftp_provider_impl.h
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
3932
N/A
/*
3932
N/A
* Copyright (c) 2009, 2015, Oracle
and
/
or
its affiliates. All rights reserved.
3932
N/A
*/
3932
N/A
3932
N/A
#
ifndef
_FTP_PROVIDER_IMPL_H
3932
N/A
#
define
_FTP_PROVIDER_IMPL_H
3932
N/A
3932
N/A
/*
3932
N/A
* This structure must match the definition of same in ftp.d.
3932
N/A
*/
3932
N/A
typedef
struct
ftpproto
{
3932
N/A
uint32_t
ftp_user
;
/* user name */
3932
N/A
uint32_t
ftp_cmd
;
/* FTP command */
3932
N/A
uint32_t
ftp_pathname
;
/* path of file being operated upon */
3932
N/A
uint32_t
ftp_raddr
;
/* remote address, as IPv6 address */
3932
N/A
uint32_t
ftp_fd
;
/* fd for transfer, if any */
3932
N/A
uint32_t
ftp_pad
;
/* padding for copyin() */
3932
N/A
uint64_t
ftp_nbytes
;
/* bytes transferred, if any */
3932
N/A
}
ftpproto_t
;
3932
N/A
3932
N/A
#
define
FTP_TRANSFER_PROTO
(
proto
,
fh
,
len
) \
3932
N/A
do
{ \
3932
N/A
bzero
((
proto
),
sizeof
(
struct
ftpproto
)); \
3932
N/A
(
proto
)->
ftp_user
= (
uint32_t
)
session
.
user
; \
3932
N/A
(
proto
)->
ftp_cmd
= (
uint32_t
)
session
.
curr_cmd
; \
3932
N/A
(
proto
)->
ftp_pathname
= (
uint32_t
)((
fh
)->
fh_path
); \
3932
N/A
(
proto
)->
ftp_raddr
= \
3932
N/A
(
int32_t
)
pr_netaddr_get_ipstr
(
session
.c->
remote_addr
); \
3932
N/A
(
proto
)->
ftp_fd
= (
uint32_t
)((
fh
)->
fh_fd
); \
3932
N/A
(
proto
)->
ftp_nbytes
= (
len
); \
3932
N/A
}
while
(0)
3932
N/A
3932
N/A
extern
int
ftp_transfer_start_enabled
(
void
);
3932
N/A
extern
int
ftp_transfer_done_enabled
(
void
);
3932
N/A
extern
void
ftp_transfer_start
(
struct
ftpproto
*);
3932
N/A
extern
void
ftp_transfer_done
(
struct
ftpproto
*);
3932
N/A
3932
N/A
#
endif
/* _FTP_PROVIDER_IMPL_H */