-
Notifications
You must be signed in to change notification settings - Fork 0
/
mytrace.h
34 lines (30 loc) · 1.43 KB
/
mytrace.h
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
/*
* Copyright (c) 2013 Steven Maresca <[email protected]>
* 2008-2010 Sam Hocevar <[email protected]>
* All Rights Reserved
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
#include <termios.h>
struct mytrace;
struct mytrace* mytrace_attach(long int pid);
struct mytrace* mytrace_fork(struct mytrace *t);
int mytrace_detach(struct mytrace *t);
long mytrace_getpid(struct mytrace *t);
int mytrace_open(struct mytrace *t, char const *path, int mode);
int mytrace_write(struct mytrace *t, int fd, char const *data, size_t len);
int mytrace_close(struct mytrace *t, int fd);
int mytrace_dup2(struct mytrace *t, int oldfd, int newfd);
int mytrace_setpgid(struct mytrace *t, long pid, long pgid);
int mytrace_setsid(struct mytrace *t);
int mytrace_kill(struct mytrace *t, long pid, int sig);
int mytrace_exit(struct mytrace *t, int status);
int mytrace_exec(struct mytrace *t, char const *command);
int mytrace_tcgets(struct mytrace *t, int fd, struct termios *tos);
int mytrace_tcsets(struct mytrace *t, int fd, struct termios *tos);
int mytrace_sctty(struct mytrace *t, int fd);
int mytrace_TIOCGPTN(struct mytrace *t, int fd, int *pts);