/usr/include/umview/umnet.h is in libumlib-dev 0.8.2-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | /*
* UMNET: (MULTI) Virtual Stack management
* Copyright (C) 2008 Renzo Davoli <renzo@cs.unibo.it>
*
* This program can be distributed under the terms of the GNU GPLv2.
* See the file COPYING.LIB.
*/
#ifndef _UMNET_H_
#define _UMNET_H_
#include <stdint.h>
#include <module.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#define AF_MAXMAX (AF_MAX + 2)
#define IOCTLLENMASK 0x07ffffff
#define IOCTL_R 0x10000000
#define IOCTL_W 0x20000000
#define UMNET_DEBUG (1 << 29)
typedef void (* voidfun)(void *arg);
struct umnet;
#if 0
struct net_info {
/* File handle. It usually set up in msocket and then
* available for all other operations */
uint64_t fh;
/* nethandle for management */
struct umnet *nethandle;
};
#endif
struct umnet_operations {
//int (*getattr) (struct stat64 *, struct umnet *nethandle);
//int (*fgetattr) (struct stat64 *, struct net_info *);
//int (*chmod) (mode_t, struct umnet *nethandle);
//int (*chown) (uid_t, gid_t, struct umnet *nethandle);
//int (*access) (int, struct umnet *nethandle);
//int (*open) (char, net_t, struct net_info *);
int (*msocket) (int, int, int, struct umnet *);
int (*bind) (int, const struct sockaddr *, socklen_t);
int (*connect) (int, const struct sockaddr *, socklen_t);
int (*listen) (int, int);
int (*accept) (int, struct sockaddr *, socklen_t *);
int (*getsockname) (int, struct sockaddr *, socklen_t *);
int (*getpeername) (int, struct sockaddr *, socklen_t *);
ssize_t (*send) (int, const void *, size_t, int) ;
ssize_t (*recv) (int, const void *, size_t, int);
ssize_t (*sendto) (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
ssize_t (*recvfrom) (int, void *, size_t, int, struct sockaddr *, socklen_t *);
ssize_t (*recvmsg)(int, struct msghdr *, int);
ssize_t (*sendmsg)(int, const struct msghdr *, int);
int (*setsockopt) (int, int, int, const void *, socklen_t);
int (*getsockopt) (int, int, int, void *, socklen_t *);
ssize_t (*read) (int, void *, size_t);
ssize_t (*write) (int, const void *, size_t);
int (*ioctl) (int, int, void *);
int (*close) (int);
int (*fcntl) (int, int, long);
int (*supported_domain) (int);
int (*event_subscribe) (voidfun cb, void *arg, int fd, int how);
int (*ioctlparms) (int, int req, struct umnet *nethandle);
int (*init) (char *source, char *mountpoint, unsigned long flags, char *args, struct umnet *nethandle);
int (*fini) (struct umnet *nethandle);
};
/* MOUNT ARG MGMT */
struct netargitem {
char *arg;
void (*fun)();
};
void netargs(char *opts, struct netargitem *netargtab, int netargsize, void *arg);
void umnet_setprivatedata(struct umnet *nethandle, void *privatedata);
void *umnet_getprivatedata(struct umnet *nethandle);
#if 0
void umnet_setmode(struct umnet *nethandle, mode_t mode);
mode_t umnet_getmode(struct umnet *nethandle);
#endif
#endif /* _UMNET_H_ */
|