1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>enum sock_type</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs"><link rel="up" href="netcore.html#idp1093082748" title="Networking Base Types"><link rel="prev" href="netcore.html" title="Chapter 1. Linux Networking"><link rel="next" href="API-struct-socket.html" title="struct socket"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">enum sock_type</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="netcore.html">Prev</a> </td><th width="60%" align="center">Networking Base Types</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-socket.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-enum-sock-type"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>enum sock_type — 2 Socket types 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4enum sock_type { 5 SOCK_STREAM, 6 SOCK_DGRAM, 7 SOCK_RAW, 8 SOCK_RDM, 9 SOCK_SEQPACKET, 10 SOCK_DCCP, 11 SOCK_PACKET 12}; </pre></div><div class="refsect1"><a name="idp1094712900"></a><h2>Constants</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">SOCK_STREAM</span></dt><dd><p> 13stream (connection) socket 14 </p></dd><dt><span class="term">SOCK_DGRAM</span></dt><dd><p> 15datagram (conn.less) socket 16 </p></dd><dt><span class="term">SOCK_RAW</span></dt><dd><p> 17raw socket 18 </p></dd><dt><span class="term">SOCK_RDM</span></dt><dd><p> 19reliably-delivered message 20 </p></dd><dt><span class="term">SOCK_SEQPACKET</span></dt><dd><p> 21sequential packet socket 22 </p></dd><dt><span class="term">SOCK_DCCP</span></dt><dd><p> 23Datagram Congestion Control Protocol socket 24 </p></dd><dt><span class="term">SOCK_PACKET</span></dt><dd><p> 25linux specific way of getting packets at the dev level. 26For writing rarp and other similar things on the user level. 27 </p></dd></dl></div></div><div class="refsect1"><a name="idp1092814668"></a><h2>Description</h2><p> 28 When adding some new socket type please 29 grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS 30 overrides this enum for binary compat reasons. 31</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="netcore.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="netcore.html#idp1093082748">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-socket.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Linux Networking </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct socket</span></td></tr></table></div></body></html> 32