zoukankan      html  css  js  c++  java
  • [DPI][TCP] linux API的接口如何控制urgent包的收发

    做DPI,写协议栈的时候,处理到了urgent数据包。突然好奇应用层是如何控制发出urgent包的呢?而接收端又是如何知道,接受到了urgent包的呢?

    man 7 tcp,中有如下一段:

    TCP supports urgent data.  Urgent data is used to signal the receiver that some important message is part of the data stream and that it should be processed as soon as possible.
    To send urgent data specify the MSG_OOB option to send(2).  When urgent data is received, the kernel sends a SIGURG signal to the process or process group that has been  set  as
    the  socket  "owner" using the SIOCSPGRP or FIOSETOWN ioctls (or the POSIX.1-specified fcntl(2) F_SETOWN operation).  When the SO_OOBINLINE socket option is enabled, urgent data
    is put into the normal data stream (a program can test for its location using the SIOCATMARK ioctl described below), otherwise it can be received only when the MSG_OOB  flag  is
    set for recv(2) or recvmsg(2).
  • 相关阅读:
    数据库30条规范
    数据库索引原理
    HashMap的实现原理
    Google 和 Baidu 常用的搜索技巧
    Arrays工具类十大常用方法
    fastjson将json格式null转化空串
    SolrCloud的介绍
    网页背景图片自适应浏览器大小
    addlinkedserver
    常用
  • 原文地址:https://www.cnblogs.com/hugetong/p/8398886.html
Copyright © 2011-2022 走看看