[vlc-commits] [Git][videolan/vlc][master] network: remove UDP-Lite support

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat May 30 16:38:22 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
2406b5f1 by Rémi Denis-Courmont at 2026-05-30T18:11:03+02:00
network: remove UDP-Lite support

The protocol was dropped in recent Linux kernel versions, and no other
OS supports it, so there is no point carrying this any longer.

- - - - -


8 changed files:

- config.h.meson
- configure.ac
- meson.build
- modules/access/rtp/rtp.c
- modules/stream_out/rtp.c
- src/input/item.c
- src/network/udp.c
- src/stream_output/stream_output.c


Changes:

=====================================
config.h.meson
=====================================
@@ -266,9 +266,6 @@
 /* Define to 1 if you have the <netinet/tcp.h> header file. */
 #mesondefine HAVE_NETINET_TCP_H
 
-/* Define to 1 if you have the <netinet/udplite.h> header file. */
-#mesondefine HAVE_NETINET_UDPLITE_H
-
 /* Define to 1 if you have the <net/if.h> header file. */
 #mesondefine HAVE_NET_IF_H
 


=====================================
configure.ac
=====================================
@@ -1196,7 +1196,7 @@ AC_CHECK_HEADER([syslog.h], [have_syslog="yes"], [have_syslog="no"])
 AM_CONDITIONAL([HAVE_SYSLOG], [test "$have_syslog" = "yes"])
 
 dnl  BSD
-AC_CHECK_HEADERS([netinet/tcp.h netinet/udplite.h sys/param.h sys/mount.h])
+AC_CHECK_HEADERS([netinet/tcp.h sys/param.h sys/mount.h])
 
 dnl  GNU/Linux
 AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h sys/auxv.h sys/eventfd.h])


=====================================
meson.build
=====================================
@@ -273,7 +273,6 @@ check_c_headers = [
     ['getopt.h'],
     ['linux/dccp.h'],
     ['linux/magic.h'],
-    ['netinet/udplite.h'],
     ['pthread.h'],
     ['poll.h'],
     ['sys/auxv.h'],


=====================================
modules/access/rtp/rtp.c
=====================================
@@ -54,10 +54,6 @@
 # define IPPROTO_DCCP 33 /* IANA */
 #endif
 
-#ifndef IPPROTO_UDPLITE
-# define IPPROTO_UDPLITE 136 /* from IANA */
-#endif
-
 struct vlc_rtp_es_id {
     struct vlc_rtp_es es;
     es_out_t *out;
@@ -470,9 +466,6 @@ static int OpenURL(vlc_object_t *obj)
     else
     if (!strcasecmp(demux->psz_name, "rtp"))
         tp = IPPROTO_UDP;
-    else
-    if (!strcasecmp(demux->psz_name, "udplite"))
-        tp = IPPROTO_UDPLITE;
     else
         return VLC_EGENERIC;
 
@@ -515,7 +508,6 @@ static int OpenURL(vlc_object_t *obj)
     switch (tp)
     {
         case IPPROTO_UDP:
-        case IPPROTO_UDPLITE:
             fd = net_OpenDgram (obj, dhost, dport, shost, sport, tp);
             if (fd == -1)
                 break;
@@ -697,5 +689,5 @@ vlc_module_begin()
     add_obsolete_string("rtp-dynamic-pt") /* since 4.0.0 */
 
     /*add_shortcut ("sctp")*/
-    add_shortcut("dccp", "rtp", "udplite")
+    add_shortcut("dccp", "rtp")
 vlc_module_end()


=====================================
modules/stream_out/rtp.c
=====================================
@@ -66,9 +66,6 @@
 #ifndef IPPROTO_DCCP
 # define IPPROTO_DCCP 33
 #endif
-#ifndef IPPROTO_UDPLITE
-# define IPPROTO_UDPLITE 136
-#endif
 
 #include <ctype.h>
 #include <errno.h>
@@ -148,11 +145,11 @@
     "This must be a 28-character-long hexadecimal string.")
 
 static const char *const ppsz_protos[] = {
-    "dccp", "sctp", "tcp", "udp", "udplite",
+    "dccp", "sctp", "tcp", "udp",
 };
 
 static const char *const ppsz_protocols[] = {
-    "DCCP", "SCTP", "TCP", "UDP", "UDP-Lite",
+    "DCCP", "SCTP", "TCP", "UDP",
 };
 
 #define RFC3016_TEXT N_("MP4A LATM")
@@ -470,8 +467,6 @@ static int Open( vlc_object_t *p_this )
         p_sys->rtcp_mux = true; /* Force RTP/RTCP mux */
     }
 #endif
-    else if (!strcasecmp (psz, "udplite") || !strcasecmp (psz, "udp-lite"))
-        p_sys->proto = IPPROTO_UDPLITE;
     else
         msg_Warn (p_this, "unknown or unsupported transport protocol \"%s\"",
                   psz);
@@ -807,8 +802,6 @@ char *SDPGenerate( sout_stream_t *p_stream, const char *rtsp_url )
             case IPPROTO_DCCP:
                 proto = "DCCP/RTP/AVP";
                 break;
-            case IPPROTO_UDPLITE:
-                return psz_sdp;
         }
     }
 


=====================================
src/input/item.c
=====================================
@@ -1212,7 +1212,7 @@ static enum input_item_type_e GuessType( const input_item_t *p_item, bool *p_net
         { "svcd",   ITEM_TYPE_DISC, false },
         { "tcp",    ITEM_TYPE_STREAM, true },
         { "terres", ITEM_TYPE_CARD, false }, /* terrestrial */
-        { "udp",    ITEM_TYPE_STREAM, true },  /* udplite too */
+        { "udp",    ITEM_TYPE_STREAM, true },
         { "unsv",   ITEM_TYPE_STREAM, true },
         { "upnp",   ITEM_TYPE_FILE, true },
         { "v4l",    ITEM_TYPE_CARD, false },


=====================================
src/network/udp.c
=====================================
@@ -68,24 +68,10 @@
 #ifndef IPPROTO_DCCP
 # define IPPROTO_DCCP 33 /* IANA */
 #endif
-#ifndef SOL_UDPLITE
-# define SOL_UDPLITE IPPROTO_UDPLITE
-#endif
-#ifndef IPPROTO_UDPLITE
-# define IPPROTO_UDPLITE 136 /* IANA */
-#endif
 #ifndef ENOPROTOOPT
 # define ENOPROTOOPT 123
 #endif
 
-#if defined (HAVE_NETINET_UDPLITE_H)
-# include <netinet/udplite.h>
-#elif defined (__linux__)
-/* still missing from glibc 2.6 */
-# define UDPLITE_SEND_CSCOV     10
-# define UDPLITE_RECV_CSCOV     11
-#endif
-
 /* */
 static int net_SetupDgramSocket (vlc_object_t *p_obj, int fd,
                                  const struct addrinfo *ptr)
@@ -711,30 +697,9 @@ int net_SetCSCov (int fd, int sendcov, int recvcov)
                     &type, &(socklen_t){ sizeof (type) }))
         return VLC_EGENERIC;
 
-#if defined( UDPLITE_RECV_CSCOV ) || defined( DCCP_SOCKOPT_SEND_CSCOV )
+#ifdef DCCP_SOCKOPT_SEND_CSCOV
     switch (type)
     {
-#ifdef UDPLITE_RECV_CSCOV
-        case SOCK_DGRAM: /* UDP-Lite */
-            if (sendcov == -1)
-                sendcov = 0;
-            else
-                sendcov += 8; /* partial */
-            if (setsockopt (fd, SOL_UDPLITE, UDPLITE_SEND_CSCOV, &sendcov,
-                            sizeof (sendcov)))
-                return VLC_EGENERIC;
-
-            if (recvcov == -1)
-                recvcov = 0;
-            else
-                recvcov += 8;
-            if (setsockopt (fd, SOL_UDPLITE, UDPLITE_RECV_CSCOV,
-                            &recvcov, sizeof (recvcov)))
-                return VLC_EGENERIC;
-
-            return VLC_SUCCESS;
-#endif
-#ifdef DCCP_SOCKOPT_SEND_CSCOV
         case SOCK_DCCP: /* DCCP and its ill-named socket type */
             if ((sendcov == -1) || (sendcov > 56))
                 sendcov = 0;
@@ -753,7 +718,6 @@ int net_SetCSCov (int fd, int sendcov, int recvcov)
                 return VLC_EGENERIC;
 
             return VLC_SUCCESS;
-#endif
     }
 #else
     VLC_UNUSED(sendcov);


=====================================
src/stream_output/stream_output.c
=====================================
@@ -1017,7 +1017,7 @@ static char *sout_stream_url_to_chain( bool b_sout_display,
     mrl_Parse( &mrl, psz_url );
 
     /* Check if the URLs goes to #rtp - otherwise we'll use #standard */
-    static const char rtplist[] = "dccp\0sctp\0tcp\0udplite\0";
+    static const char rtplist[] = "dccp\0sctp\0tcp\0";
     for (const char *a = rtplist; *a; a += strlen (a) + 1)
         if (strcmp (a, mrl.psz_access) == 0)
             goto rtp;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2406b5f1b49dde462b7f3ac720a7a40e9e52cd5d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/2406b5f1b49dde462b7f3ac720a7a40e9e52cd5d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list