• 学习iptables的一些链接

    日期:2008-08-19 | 分类:网络编程

    http://linux.chinaunix.net/bbs/viewthread.php?tid=238959&extra=
  • 编写自己的php扩展函数

    日期:2008-07-02 | 分类:网络编程

    php程序写的时间长了,自然对他所提供的功能了如指掌,他所提供的一大堆功能,真是觉得很好用,但有时候会发现php也缺少一些功能,自己总是会产生为php添加一些自定义的功能的想法。久而久之,终于今天憋不住了,开始动手研究如何添加。

     

    下载一个php的源代码包,这里使用的是php 4.0.5版,解压后会看到php的根目录下会有README.EXT_SKEL这样一个文件,打开详细阅读了一下,发现了一个非常好用的工具,这个工具可以帮你构建一个...
  • epoll写的一段文件上传程序

    日期:2008-01-19 | 分类:网络编程

    // 服务端程序
    #include "common.h"
    #include <sys/epoll.h>
    // 读操作
    int read_task( int fd )
    {
        if ( fd <= 0 )
            return FAIL;
        char *mem = NU...
  •       snort-0.96 一个用libpcap包实现的简单sniffer工具,并且实现了日志功能,如果是研究初期的libpcap抓包工具,可以看这个源代码,到www.snort.org上面下载这个版本的tar包。

          snort的这个版本是作者在98年开发的,源代码总共才一千多行,一个头文件,一个主文件,里面有很多各个层次网络包的函数说明,可以拿过来用吧。...
  • Network block devices and OOM safety

    日期:2007-12-20 | 分类:网络编程

    iSCSI is, for all practical purposes, a way of attaching storage devices to a fast network interconnect and making them look like local SCSI drives. There is a great deal of interest in iSCSI for high-end "storage area network" applications, ...
  • Network transmit batching

    日期:2007-12-20 | 分类:网络编程

    By Jonathan Corbet
    August 22, 2007 At the core of most network drivers is the hard_start_xmit() method, which is called once for every packet which is to be transmitted. This method will normally acquire locks and insert the packet into the adapte...
  • Large receive offload

    日期:2007-12-20 | 分类:网络编程

    By Jonathan Corbet
    August 1, 2007 High-performance networking is continually faced with a challenge: local networking technologies are getting faster more quickly than processor and memory speeds. So every time that the venerable Ethernet technolo...
  • alloc_skb_from_cache()

    日期:2007-12-20 | 分类:网络编程

    The post-2.6.10 mainline kernel contains a set of patches designed to help with the merging of the Xen virtual architecture. One of them is an enhancement to the networking API which could have uses beyond Xen. The "socket buffer" (SKB) is th...
  • Distributed storage

    日期:2007-12-20 | 分类:网络编程

    By Jonathan Corbet
    August 21, 2007 Evgeniy Polyakov is not an easily discouraged developer. He has been the source of a great deal of interesting kernel code - including a network channels implementation, an asynchronous crypto framework, the keve...
  • TCP 系统调用序列

    日期:2007-12-13 | 分类:网络编程

    TCP/IP 编程接口提供各种系统调用,以帮助您有效地使用该协议。TCP 堆栈代码数量繁多,深入到内核级别的完整调用序列可以帮助您了解 TCP 堆栈。在本文中,将回顾和学习关于 TCP 调用序列的详细信息,其中包括对 FreeBSD 的引用,以及在用户级进行系统调用后在 TCP 堆栈中发生的重要函数调用。引言

    典型的 TCP 客户机和服务器应用程序通过发布 TCP 系统调用序列来获取某些函数。这些系统调用包括 socket ()、bind ()、listen ()、accept...
  • libpcap 是 unix/linux 平台下的网络数据包捕获函数包,大多数网络监控软件都以它为基础。Libpcap 可以在绝大多数类 unix 平台下工作,本文分析了 libpcap 在 linux 下的源代码实现,其中重点是 linux 的底层包捕获机制和过滤器设置方式,同时也简要的讨论了 libpcap 使用的包过滤机制 BPF。网络监控

    绝大多数的现代操作系统都提供了对底层网络数据包捕获的机制,在捕获机制之上可以建立网络监控(Network Monitoring)应用...
  • Linux 网络栈

    日期:2007-12-08 | 分类:网络编程

    Linux® 操作系统的最大特性之一就是它的网络栈。它最初源于 BSD 的网络栈,具有一套非常干净的接口,组织得非常好。其接口范围从协议无关层(例如通用 socket 层接口或设备层)到各种网络协议的具体层。本文将从分层角度对 Linux 网络栈的接口进行探索,并介绍其中的一些主要结构。协议简介

    虽然对于网络的正式介绍一般都参考了 OSI(Open Systems Interconnection)模型,但是本文对 Linux 中基本网络栈的介绍分为四层的 Interne...
  • Programming with pcap

    日期:2007-12-08 | 分类:网络编程

    Programming with pcapTim Carstens
    timcarst at yahoo dot com
    Further editing and development by Guy Harris
    guy at alum dot mit dot edu Ok, let's begin by defining who this document is written for. Obviously, some basic knowledge of C is r...
  • Aha, finally it is time to start using our newly obtained Jedi skills! (wheee!!) This section will focus on peaking into the packets to extract the information (which is what we wanted to begin with). First off we must arm ourselves! Go ahead and get a...
  • Hi :-), this section consists of a discussion on how to write a simple packet capture engine. The goal is to demonstrate methods of capturing and filtering multiple packets to aid in packet analysis. All the juicy info on disecting IP packets and forgi...