Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././../../../../../../usr/./include/inet/netlink_impl.h
Real path: /usr/include/inet/netlink_impl.h
Zurück
/* * Copyright (c) 2017, 2021, Oracle and/or its affiliates. */ #ifndef _NETLINK_IMPL_H #define _NETLINK_IMPL_H #ifdef __cplusplus extern "C" { #endif #include <sys/strsubr.h> #include <sys/socketvar.h> #include <sys/cmn_err.h> #define PTRDIFF(a, b) ((uintptr_t)(((uintptr_t)(a)) - ((uintptr_t)(b)))) #define NETLINK_CONN_UNBOUND 0 #define NETLINK_CONN_BOUND 1 struct netlink_stack_s; struct nl_conn_s; typedef struct netlink_proto_entry_s { int nlpe_proto; int nlpe_mcast_listeners; int nlpe_mcast_groups; kmutex_t nlpe_bind_list_lock; list_t nlpe_bind_list; kmutex_t nlpe_mcast_list_lock; list_t nlpe_mcast_list; kmutex_t nlpe_family_list_lock; list_t nlpe_family_list; kmutex_t nlpe_conn_list_lock; list_t nlpe_conn_list; int (*nlpe_mcast_bind)(struct nl_conn_s *, int); void (*nlpe_mcast_unbind)(struct nl_conn_s *, int); int (*nlpe_netlink_rcv) (struct netlink_proto_entry_s *, mblk_t *, struct nl_conn_s *); struct netlink_stack_s *nlpe_netstack_ptr; } nl_proto_entry_t; typedef struct netlink_stack_s { nl_proto_entry_t *netlink_table[SOL_MAX_NETLINK_PROTO]; kmutex_t netlink_table_lock; } nl_stack_t; typedef struct nl_ccb_info_s { struct nlmsghdr nl_ccb_nlh; mblk_t *(*nl_ccb_dump)(struct nl_conn_s *, struct nlmsghdr *, int *); } nl_ccb_info_t; typedef struct nl_conn_s { uint32_t nlc_ref; kmutex_t nlc_ref_lock; /* protects ref */ kcondvar_t nlc_ref_cv; sa_family_t nlc_family; int nlc_proto; uint16_t nlc_state; boolean_t nlc_is_kernel; uint32_t nlc_bind_portid; uint32_t nlc_dst_portid; /* connected port */ uint32_t nlc_dst_group; /* connected group */ uint32_t nlc_flags; uint32_t nlc_subscriptions; /* not used */ uint32_t nlc_ngroups; /* num of groups subscrbd to */ uint32_t nlc_groups; /* bit mask of groups subscrbd to */ sock_upcalls_t *nlc_upcalls; sock_upper_handle_t nlc_upper_handle; list_node_t nlc_bind_next; list_node_t nlc_conn_next; list_node_t nlc_mcast_next; kmutex_t nlc_rx_lock; kcondvar_t nlc_rx_cv; mblk_t *nlc_rx_list_head; mblk_t *nlc_rx_list_tail; int (*nlc_mcast_bind)(struct nl_conn_s *, int); void (*nlc_mcast_unbind)(struct nl_conn_s *, int); nl_proto_entry_t *nlc_proto_entry; boolean_t nlc_ccb_running; kmutex_t nlc_ccb_mutex; nl_ccb_info_t nlc_ccb_info; } nl_conn_t; typedef int (*netlink_kernel_lstnr)(nl_proto_entry_t *, mblk_t *, nl_conn_t *); extern int netlink_init(); extern int netlink_fini(); extern void netlink_generic_init(nl_stack_t *); extern void netlink_generic_fini(nl_proto_entry_t *); extern nl_proto_entry_t *netlink_get_proto_entry(uint_t); extern int netlink_kernel_recv(nl_proto_entry_t *, mblk_t *, nl_conn_t *, int (*__family_rcv_func)(nl_conn_t *, nl_proto_entry_t *, mblk_t *)); extern int netlink_dump_start(nl_conn_t *, struct nlmsghdr *); extern int netlink_kernel_create(nl_stack_t *, int, netlink_kernel_lstnr, uint_t, uint_t); struct nla_policy { uint16_t type; uint16_t len; }; /* * Standard attribute types to specify validation policy */ enum { NLA_UNSPEC, NLA_UINT8, NLA_UINT16, NLA_UINT32, NLA_UINT64, NLA_STRING, /* variable length string */ NLA_FLAG, /* boolean flag */ NLA_MSECS, NLA_NESTED, NLA_NESTED_COMPAT, /* currently not supported */ NLA_NUL_STRING, /* variable length NULL terminated string */ NLA_BINARY, NLA_SINT8, NLA_SINT16, NLA_SINT32, NLA_SINT64, __NLA_TYPE_MAX }; #define NLA_TYPE_MAX (__NLA_TYPE_MAX - 1) int nl_policy_parse(nlattr_t **__tb, int __maxtype, const nlattr_t *__head, int __len, const struct nla_policy *__policy); nlattr_t *nl_msg_reserve(mblk_t *__mp, int __attrtype, int __attrlen); boolean_t netlink_has_listeners(nl_conn_t *__nlconnp, uint32_t __group); void netlink_conn_hold(nl_conn_t *); void netlink_conn_release(nl_conn_t *); void netlink_ack(nl_conn_t *, struct nlmsghdr *, int); #ifdef __cplusplus } #endif #endif /* _NETLINK_IMPL_H */