VCOM Linux Driver
Advantech Inc.
Loading...
Searching...
No Matches
proc_tools.h
Go to the documentation of this file.
1#ifndef _PROC_TOOLS_H
2#define _PROC_TOOLS_H
3
4#define _GNU_SOURCE
5#include <sys/types.h>
6#include <sys/stat.h>
7#include <sys/file.h>
8#include <sys/wait.h>
9#include <sys/time.h>
10#include <sys/param.h>
11#include <sys/ioctl.h>
12#include <stdio.h>
13#include <string.h>
14#include <unistd.h>
15#include <fcntl.h>
16#include <signal.h>
17#include <stdarg.h>
18#include <ctype.h>
19#include <dirent.h>
20#include <pthread.h>
21#include <errno.h>
22#include <stdlib.h>
23#include <sys/select.h>
24
25int __search_lport_stat_inode(int ipfamily, unsigned short port, unsigned short stat, ino_t *out);
26int __search_port_inode( unsigned short port, int stat, ino_t * out);
27
28int __pidpath_get_cmd(char * pidpath, char * cmd, int cmdlen);
29int __pid_get_cmd(pid_t pid, char *cmd, int cmdlen);
30char * __cmd_get_opts(char * cmd, int cmdlen, char * opt);
31
32int __pid_search_fd_inode(pid_t pid, ino_t inode);
33int __cmd_inode_search_pid(char * cmd, ino_t inode, char * buf, int buflen, int *retlen, pid_t *pidret);
34
35#define pt_buf_maxstrlen(BUF) (sizeof(BUF) - (size_t)1)
36
37
38#endif
int __pidpath_get_cmd(char *pidpath, char *cmd, int cmdlen)
Definition proc_tools.c:165
int __pid_get_cmd(pid_t pid, char *cmd, int cmdlen)
Definition proc_tools.c:186
int __pid_search_fd_inode(pid_t pid, ino_t inode)
Definition proc_tools.c:120
int __cmd_inode_search_pid(char *cmd, ino_t inode, char *buf, int buflen, int *retlen, pid_t *pidret)
Definition proc_tools.c:194
char * __cmd_get_opts(char *cmd, int cmdlen, char *opt)
Definition proc_tools.c:251
int __search_port_inode(unsigned short port, int stat, ino_t *out)
Definition proc_tools.c:94
int __search_lport_stat_inode(int ipfamily, unsigned short port, unsigned short stat, ino_t *out)
Definition proc_tools.c:5
unsigned int pid
Definition vcom_proto.h:0
unsigned short cmd
Definition vcom_proto.h:2