aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 3950d3c2850..d9456f69904 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -108,6 +108,8 @@ struct kobj_type {
108 void (*release)(struct kobject *kobj); 108 void (*release)(struct kobject *kobj);
109 const struct sysfs_ops *sysfs_ops; 109 const struct sysfs_ops *sysfs_ops;
110 struct attribute **default_attrs; 110 struct attribute **default_attrs;
111 const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj);
112 const void *(*namespace)(struct kobject *kobj);
111}; 113};
112 114
113struct kobj_uevent_env { 115struct kobj_uevent_env {
@@ -134,6 +136,30 @@ struct kobj_attribute {
134 136
135extern const struct sysfs_ops kobj_sysfs_ops; 137extern const struct sysfs_ops kobj_sysfs_ops;
136 138
139enum kobj_ns_type {
140 KOBJ_NS_TYPE_NONE = 0,
141 KOBJ_NS_TYPES
142};
143
144struct sock;
145struct kobj_ns_type_operations {
146 enum kobj_ns_type type;
147 const void *(*current_ns)(void);
148 const void *(*netlink_ns)(struct sock *sk);
149 const void *(*initial_ns)(void);
150};
151
152int kobj_ns_type_register(const struct kobj_ns_type_operations *ops);
153int kobj_ns_type_registered(enum kobj_ns_type type);
154const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent);
155const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj);
156
157const void *kobj_ns_current(enum kobj_ns_type type);
158const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk);
159const void *kobj_ns_initial(enum kobj_ns_type type);
160void kobj_ns_exit(enum kobj_ns_type type, const void *ns);
161
162
137/** 163/**
138 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. 164 * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
139 * 165 *