C++ 网络抓包和操作库 libtins

码农软件 · 软件分类 · 网络工具包 · 2019-02-26 21:27:26

软件介绍

libtins 是一个高级支持多平台的 C++ 网络抓包和操作库。开发者可以利用 libtins 在应用实现对网络数据包的分析和操作。

示例代码:

#include <iostream>
#include <tins/tins.h>

using namespace Tins;

bool handler(const PDU &pdu) {
    const IP &ip = pdu.rfind_pdu<IP>(); // Find the IP layer
    const TCP &tcp = pdu.rfind_pdu<TCP>(); // Find the TCP layer
    std::cout << ip.src_addr() << ':' << tcp.sport() << " -> " 
              << ip.dst_addr() << ':' << tcp.dport() << std::endl;
    return true;
}

int main() {
    Sniffer("eth0").sniff_loop(handler);
}

本文地址:https://codercto.com/soft/d/206.html

网页设计创意书(卷2)

网页设计创意书(卷2)

麦克尼尔 / 图灵编辑部 / 人民邮电 / 2012-1 / 49.00元

《网页设计创意书(卷2)》是《网页设计创意书》的卷2,但并非其简单补充,而是作者基于近几年网站发展新趋势的再创作。《网页设计创意书(卷2)》先讲解了如何从他人的优秀设计中寻找灵感,接着阐述了重点、对比、平衡、对齐等网站设计的基本原则,然后将网站按类型、设计元素、风格和主题、结构样式和结构元素分类,并分章介绍了每一类的设计技巧。《网页设计创意书(卷2)》语言简练,结合作者精挑细选的网站实例,通俗易懂......一起来看看 《网页设计创意书(卷2)》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器