<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>masami256</author_name>
  <author_url>https://blog.hatena.ne.jp/masami256/</author_url>
  <blog_title>φ(・・*)ゞ ｳｰﾝ　カーネルとか弄ったりのメモ</blog_title>
  <blog_url>https://kernhack.hatenablog.com/</blog_url>
  <categories>
    <anon>linux</anon>
    <anon>network</anon>
  </categories>
  <description>TFO(tcp fastopen)で遊んでいて気付いたんですが、sendto(2)とsendmsg(2)はflagsに未知の値をセットしたときの扱いが両者で挙動の差があるっぽい。 このflags引数はMSG_PEEKとかMSG_XXXなものを論理和とった結果を渡しますが、この変数に未知の値を渡したとき（今はTFOなので0x20000000を渡したとき）にsendmsg(2)は-EINVALを返してくるけどsendto(2)はエラーにならずに処理が成功しました。ちなみに、TFOの値を0x20000000としているのはlinuxカーネルのヘッダー（include/linux/socket.h)でM…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkernhack.hatenablog.com%2Fentry%2F2013%2F05%2F26%2F123134&quot; title=&quot;φ(・・*)ゞ ｳｰﾝ sendto(2)とsendmsg(2)に渡すflagsに関する挙動の差 - φ(・・*)ゞ ｳｰﾝ　カーネルとか弄ったりのメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-05-26 12:31:34</published>
  <title>φ(・・*)ゞ ｳｰﾝ sendto(2)とsendmsg(2)に渡すflagsに関する挙動の差</title>
  <type>rich</type>
  <url>https://kernhack.hatenablog.com/entry/2013/05/26/123134</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
