diff options
author | Alexander Eremin <a.eremin@nexenta.com> | 2015-06-05 08:00:15 -0700 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2015-06-09 13:29:27 -0400 |
commit | 19581f849bf7a7ff70969056873a9f08150b2e7c (patch) | |
tree | 8f068c7ccceb25628d71b2562355f8da03c43ef6 /usr/src/uts/common/sys/socketvar.h | |
parent | f68770eaa148461c70a7bafc74cf10adf8fb4add (diff) | |
download | illumos-joyent-19581f849bf7a7ff70969056873a9f08150b2e7c.tar.gz |
4770 soconfig(1M) needs an option to print the in-kernel socket configuration table
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/uts/common/sys/socketvar.h')
-rw-r--r-- | usr/src/uts/common/sys/socketvar.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/usr/src/uts/common/sys/socketvar.h b/usr/src/uts/common/sys/socketvar.h index 8221c620a8..52fa3a5822 100644 --- a/usr/src/uts/common/sys/socketvar.h +++ b/usr/src/uts/common/sys/socketvar.h @@ -35,6 +35,9 @@ * software developed by the University of California, Berkeley, and its * contributors. */ +/* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. + */ #ifndef _SYS_SOCKETVAR_H #define _SYS_SOCKETVAR_H @@ -506,6 +509,7 @@ extern int sockparams_add(struct sockparams *); extern int sockparams_delete(int, int, int); extern int sockparams_new_filter(struct sof_entry *); extern void sockparams_filter_cleanup(struct sof_entry *); +extern int sockparams_copyout_socktable(uintptr_t); extern void smod_init(void); extern void smod_add(smod_info_t *); @@ -975,6 +979,7 @@ struct sockinfo { #define SOCKCONFIG_REMOVE_SOCK 1 #define SOCKCONFIG_ADD_FILTER 2 #define SOCKCONFIG_REMOVE_FILTER 3 +#define SOCKCONFIG_GET_SOCKTABLE 4 /* * Data structures for configuring socket filters. @@ -1013,6 +1018,24 @@ struct sockconfig_filter_props { sof_socktuple_t *sfp_socktuple; }; +/* + * Data structures for the in-kernel socket configuration table. + */ +typedef struct sockconfig_socktable_entry { + int se_family; + int se_type; + int se_protocol; + int se_refcnt; + int se_flags; + char se_modname[MODMAXNAMELEN]; + char se_strdev[MAXPATHLEN]; +} sockconfig_socktable_entry_t; + +typedef struct sockconfig_socktable { + uint_t num_of_entries; + sockconfig_socktable_entry_t *st_entries; +} sockconfig_socktable_t; + #ifdef _SYSCALL32 typedef struct sof_socktuple32 { @@ -1030,6 +1053,11 @@ struct sockconfig_filter_props32 { caddr32_t sfp_socktuple; }; +typedef struct sockconfig_socktable32 { + uint_t num_of_entries; + caddr32_t st_entries; +} sockconfig_socktable32_t; + #endif /* _SYSCALL32 */ #define SOCKMOD_PATH "socketmod" /* dir where sockmods are stored */ |