Print this page
dccp: starting module template

@@ -109,10 +109,13 @@
 #include <ipp/ipp.h>
 #include <ipp/ipp_impl.h>
 #include <ipp/ipgpc/ipgpc.h>
 
 #include <sys/pattr.h>
+#include <inet/dccp.h>
+#include <inet/dccp_impl.h>
+#include <inet/dccp_ip.h>
 #include <inet/ipclassifier.h>
 #include <inet/sctp_ip.h>
 #include <inet/sctp/sctp_impl.h>
 #include <inet/udp_impl.h>
 #include <inet/rawip_impl.h>

@@ -1819,10 +1822,42 @@
                  */
                 if ((uchar_t *)ipha + hdr_length + ICMP_MIN_TP_HDR_LEN >
                     mp->b_wptr)
                         goto truncated;
                 break;
+        case IPPROTO_DCCP: {
+                dccpha_t        *dccpha;
+
+                /*
+                 * Verify we have at least ICMP_MIN_TP_HDR_LEN bytes of
+                 * transport header.
+                 */
+                if ((uchar_t *)ipha + hdr_length + ICMP_MIN_TP_HDR_LEN >
+                    mp->b_wptr)
+                        goto truncated;
+
+                cmn_err(CE_NOTE, "icmp_inbound_verify_v4");
+
+                dccpha = (dccpha_t *)((uchar_t *)ipha + hdr_length);
+                /* XXX:DCCP */
+/*
+                connp = ipcl_dccp_lookup_reversed_ipv4(ipha, dccpha,
+                    DCCPS_LISTEN, ipst);
+                if (connp == NULL) {
+                        goto discard_pkt;
+                }
+
+                if ((connp->conn_verifyicmp != NULL) &&
+                    !connp->conn_verifyicmp(connp, dccpha, icmph, NULL, ira)) {
+                        CONN_DEC_REF(connp);
+                        goto discard_pkt;
+                }
+
+                CONN_DEC_REF(connp);
+*/
+                break;
+        }
         case IPPROTO_ESP:
         case IPPROTO_AH:
                 break;
         case IPPROTO_ENCAP:
                 if ((uchar_t *)ipha + hdr_length + sizeof (ipha_t) >

@@ -2167,10 +2202,14 @@
                 ira->ira_flags |= IRAF_ICMP_ERROR;
                 ip_fanout_sctp(mp, &ripha, NULL, ports, ira);
                 ira->ira_flags &= ~IRAF_ICMP_ERROR;
                 return;
 
+        case IPPROTO_DCCP:
+                cmn_err(CE_NOTE, "icmp_inbound_error_fanout_v4");
+                return;
+
         case IPPROTO_ESP:
         case IPPROTO_AH:
                 if (!ipsec_loaded(ipss)) {
                         ip_proto_not_sup(mp, ira);
                         return;

@@ -4309,10 +4348,11 @@
         tnet_fini();
 
         icmp_ddi_g_destroy();
         rts_ddi_g_destroy();
         udp_ddi_g_destroy();
+        dccp_ddi_g_destroy();
         sctp_ddi_g_destroy();
         tcp_ddi_g_destroy();
         ilb_ddi_g_destroy();
         dce_g_destroy();
         ipsec_policy_g_destroy();

@@ -4545,10 +4585,11 @@
             offsetof(th_hash_t, thh_link));
 #endif
         ipsec_policy_g_init();
         tcp_ddi_g_init();
         sctp_ddi_g_init();
+        dccp_ddi_g_init();
         dce_g_init();
 
         /*
          * We want to be informed each time a stack is created or
          * destroyed in the kernel, so we can maintain the

@@ -9682,13 +9723,19 @@
                 return (1);
 
         if ((mpctl = sctp_snmp_get_mib2(q, mpctl, sctps)) == NULL) {
                 return (1);
         }
+
         if ((mpctl = ip_snmp_get_mib2_ip_dce(q, mpctl, ipst)) == NULL) {
                 return (1);
         }
+
+        if ((mpctl = dccp_snmp_get(q, mpctl, legacy_req)) == NULL) {
+                return (1);
+        }
+
         freemsg(mpctl);
         return (1);
 }
 
 /* Get global (legacy) IPv4 statistics */

@@ -15235,10 +15282,11 @@
         case CPU_INIT:
         case CPU_CPUPART_IN:
                 cpu_seqid = cpu[id]->cpu_seqid;
                 netstack_next_init(&nh);
                 while ((ns = netstack_next(&nh)) != NULL) {
+                        dccp_stack_cpu_add(ns->netstack_dccp, cpu_seqid);
                         tcp_stack_cpu_add(ns->netstack_tcp, cpu_seqid);
                         sctp_stack_cpu_add(ns->netstack_sctp, cpu_seqid);
                         udp_stack_cpu_add(ns->netstack_udp, cpu_seqid);
                         netstack_rele(ns);
                 }