Print this page
dccp: conn_t
@@ -32,10 +32,11 @@
#include <inet/common.h>
#include <inet/ip.h>
#include <inet/mi.h>
#include <inet/tcp.h>
+#include <inet/dccp.h>
#include <inet/ip6.h>
#include <netinet/in.h> /* for IPPROTO_* constants */
#include <sys/sdt.h>
#include <sys/socket_proto.h>
#include <sys/sunddi.h>
@@ -82,11 +83,11 @@
#define IPCL_SCTPCONN 0x00000002 /* From sctp_conn_cache */
#define IPCL_IPCCONN 0x00000004 /* From ip_conn_cache */
#define IPCL_UDPCONN 0x00000008 /* From udp_conn_cache */
#define IPCL_RAWIPCONN 0x00000010 /* From rawip_conn_cache */
#define IPCL_RTSCONN 0x00000020 /* From rts_conn_cache */
-/* Unused 0x00000040 */
+#define IPCL_DCCPCONN 0x00000040 /* From dccp_conn_cache */
#define IPCL_IPTUN 0x00000080 /* iptun module above us */
#define IPCL_NONSTR 0x00001000 /* A non-STREAMS socket */
/* Unused 0x10000000 */
@@ -119,10 +120,13 @@
((connp)->conn_flags & IPCL_RTSCONN)
#define IPCL_IS_IPTUN(connp) \
((connp)->conn_flags & IPCL_IPTUN)
+#define IPCL_IS_DCCP(connp) \
+ ((connp)->conn_flags & IPCL_DCCPCONN)
+
#define IPCL_IS_NONSTR(connp) ((connp)->conn_flags & IPCL_NONSTR)
typedef struct connf_s connf_t;
typedef struct
@@ -235,18 +239,20 @@
struct udp_s *cp_udp; /* Pointer to the udp struct */
struct icmp_s *cp_icmp; /* Pointer to rawip struct */
struct rts_s *cp_rts; /* Pointer to rts struct */
struct iptun_s *cp_iptun; /* Pointer to iptun_t */
struct sctp_s *cp_sctp; /* For IPCL_SCTPCONN */
+ struct dccp_s *cp_dccp; /* Pointer to dccp struct */
void *cp_priv;
} conn_proto_priv;
#define conn_tcp conn_proto_priv.cp_tcp
#define conn_udp conn_proto_priv.cp_udp
#define conn_icmp conn_proto_priv.cp_icmp
#define conn_rts conn_proto_priv.cp_rts
#define conn_iptun conn_proto_priv.cp_iptun
#define conn_sctp conn_proto_priv.cp_sctp
+#define conn_dccp conn_proto_priv.cp_dccp
#define conn_priv conn_proto_priv.cp_priv
kcondvar_t conn_cv;
uint8_t conn_proto; /* protocol type */
@@ -649,10 +655,22 @@
IN6_ARE_ADDR_EQUAL(&(connp)->conn_faddr_v6, (faddr)))
#define IPCL_UDP_HASH(lport, ipst) \
IPCL_PORT_HASH(lport, (ipst)->ips_ipcl_udp_fanout_size)
+#define IPCL_DCCP_CONN_HASH(src, ports, ipst) \
+ ((unsigned)(ntohl((src)) ^ ((ports) >> 24) ^ ((ports) >> 16) ^ \
+ ((ports) >> 8) ^ (ports)) % (ipst)->ips_ipcl_dccp_conn_fanout_size)
+
+#define IPCL_DCCP_CONN_HASH_V6(src, ports, ipst) \
+ IPCL_DCCP_CONN_HASH(V4_PART_OF_V6((src)), (ports), (ipst))
+
+#define IPCL_DCCP_BIND_HASH(lport, ipst) \
+ ((unsigned)(((lport) >> 8) ^ (lport)) % \
+ (ipst)->ips_ipcl_dccp_bind_fanout_size)
+
+
#define CONN_G_HASH_SIZE 1024
/* Raw socket hash function. */
#define IPCL_RAW_HASH(lport, ipst) \
IPCL_PORT_HASH(lport, (ipst)->ips_ipcl_raw_fanout_size)
@@ -708,10 +726,15 @@
void ipcl_globalhash_remove(conn_t *);
void ipcl_walk(pfv_t, void *, ip_stack_t *);
conn_t *ipcl_tcp_lookup_reversed_ipv4(ipha_t *, tcpha_t *, int, ip_stack_t *);
conn_t *ipcl_tcp_lookup_reversed_ipv6(ip6_t *, tcpha_t *, int, uint_t,
ip_stack_t *);
+/*
+conn_t *ipcl_dccp_lookup_reversed_ipv4(ipha_t *, dccpha_t *, int, ip_stack_t *);
+conn_t *ipcl_dccp_lookup_reversed_ipv6(ip6_t *, dccpha_t *, int, uint_t,
+ ip_stack_t *);
+*/
conn_t *ipcl_lookup_listener_v4(uint16_t, ipaddr_t, zoneid_t, ip_stack_t *);
conn_t *ipcl_lookup_listener_v6(uint16_t, in6_addr_t *, uint_t, zoneid_t,
ip_stack_t *);
int conn_trace_ref(conn_t *);
int conn_untrace_ref(conn_t *);