procopenfiles

## procopenfiles procopenfiles |

## Synopsis

    #include <glibtop/procopenfiles.h>

    #define             GLIBTOP_PROC_OPEN_FILES_NUMBER
    #define             GLIBTOP_PROC_OPEN_FILES_TOTAL
    #define             GLIBTOP_PROC_OPEN_FILES_SIZE
    #define             GLIBTOP_MAX_PROC_OPEN_FILES
    #define             GLIBTOP_FILE_ENTRY_FD
    #define             GLIBTOP_FILE_ENTRY_NAME
    #define             GLIBTOP_FILE_ENTRY_TYPE
    #define             GLIBTOP_FILE_ENTRY_INETSOCKET_DST_HOST
    #define             GLIBTOP_FILE_ENTRY_INETSOCKET_DST_PORT
    #define             GLIBTOP_MAX_OPEN_FILE_ENTRY
    #define             GLIBTOP_OPEN_FILENAME_LEN
    #define             GLIBTOP_OPEN_DEST_HOST_LEN
                        glibtop_open_files_entry;
                        glibtop_proc_open_files;
    glibtop_open_files_entry * glibtop_get_proc_open_files  (glibtop_proc_open_files *buf,
                                                             pid_t pid);
    #define             glibtop_get_proc_open_files_r
    glibtop_open_files_entry * glibtop_get_proc_open_files_l
                                                            (glibtop *server,
                                                             glibtop_proc_open_files *buf,
                                                             pid_t pid);
    glibtop_open_files_entry * glibtop_get_proc_open_files_p
                                                            (glibtop *server,
                                                             glibtop_proc_open_files *buf,
                                                             pid_t pid);
    glibtop_open_files_entry * glibtop_get_proc_open_files_s
                                                            (glibtop *server,
                                                             glibtop_proc_open_files *buf,
                                                             pid_t pid);

## Description

## Details

### GLIBTOP_PROC_OPEN_FILES_NUMBER

    #define GLIBTOP_PROC_OPEN_FILES_NUMBER		0

### GLIBTOP_PROC_OPEN_FILES_TOTAL

    #define GLIBTOP_PROC_OPEN_FILES_TOTAL		1

### GLIBTOP_PROC_OPEN_FILES_SIZE

    #define GLIBTOP_PROC_OPEN_FILES_SIZE		2

### GLIBTOP_MAX_PROC_OPEN_FILES

    #define GLIBTOP_MAX_PROC_OPEN_FILES		3

### GLIBTOP_FILE_ENTRY_FD

    #define GLIBTOP_FILE_ENTRY_FD				0

### GLIBTOP_FILE_ENTRY_NAME

    #define GLIBTOP_FILE_ENTRY_NAME				1

### GLIBTOP_FILE_ENTRY_TYPE

    #define GLIBTOP_FILE_ENTRY_TYPE				2

### GLIBTOP_FILE_ENTRY_INETSOCKET_DST_HOST

    #define GLIBTOP_FILE_ENTRY_INETSOCKET_DST_HOST		3

### GLIBTOP_FILE_ENTRY_INETSOCKET_DST_PORT

    #define GLIBTOP_FILE_ENTRY_INETSOCKET_DST_PORT		4

### GLIBTOP_MAX_OPEN_FILE_ENTRY

    #define GLIBTOP_MAX_OPEN_FILE_ENTRY		5

### GLIBTOP_OPEN_FILENAME_LEN

    #define GLIBTOP_OPEN_FILENAME_LEN	215

### GLIBTOP_OPEN_DEST_HOST_LEN

    #define GLIBTOP_OPEN_DEST_HOST_LEN	46

### glibtop_open_files_entry

    typedef struct {
    	int fd;
    	guint16 type; /* An "enum glibtop_file_type" value. */
    	union {
    		/* When type == GLIBTOP_FILE_TYPE_INETSOCKET or
    		 * when type == GLIBTOP_FILE_TYPE_INET6SOCKET */
    		struct {
    			char dest_host[GLIBTOP_OPEN_DEST_HOST_LEN+1];
    			int dest_port;
    		} sock;

    		/* When type == GLIBTOP_FILE_TYPE_FILE */
    		struct {
    			char name[GLIBTOP_OPEN_FILENAME_LEN+1];
    		} file;

    		/* When type == GLIBTOP_FILE_TYPE_LOCALSOCKET */
    		struct {
    			char name[GLIBTOP_OPEN_FILENAME_LEN+1];
    		} localsock;

    	} info;
    } glibtop_open_files_entry;

### glibtop_proc_open_files

    typedef struct {
    	guint64	flags;
    	guint64 number;			/* GLIBTOP_PROC_OPEN_FILES_NUMBER */
    	guint64 total;			/* GLIBTOP_PROC_OPEN_FILES_TOTAL  */
    	guint64 size;			/* GLIBTOP_PROC_OPEN_FILES_SIZE   */
    } glibtop_proc_open_files;

### glibtop_get_proc_open_files ()

    glibtop_open_files_entry * glibtop_get_proc_open_files  (glibtop_proc_open_files *buf,
                                                             pid_t pid);

`buf` : |
`pid` : |
Returns : |

### glibtop_get_proc_open_files_r

    #define             glibtop_get_proc_open_files_r

### glibtop_get_proc_open_files_l ()

    glibtop_open_files_entry * glibtop_get_proc_open_files_l
                                                            (glibtop *server,
                                                             glibtop_proc_open_files *buf,
                                                             pid_t pid);

`server` : |
`buf` : |
`pid` : |
Returns : |

### glibtop_get_proc_open_files_p ()

    glibtop_open_files_entry * glibtop_get_proc_open_files_p
                                                            (glibtop *server,
                                                             glibtop_proc_open_files *buf,
                                                             pid_t pid);

`server` : |
`buf` : |
`pid` : |
Returns : |

### glibtop_get_proc_open_files_s ()

    glibtop_open_files_entry * glibtop_get_proc_open_files_s
                                                            (glibtop *server,
                                                             glibtop_proc_open_files *buf,
                                                             pid_t pid);

`server` : |
`buf` : |
`pid` : |
Returns : |