{"id":13418551,"url":"https://github.com/kohler/click","last_synced_at":"2025-05-16T08:06:52.602Z","repository":{"id":1082664,"uuid":"929129","full_name":"kohler/click","owner":"kohler","description":"The Click modular router: fast modular packet processing and analysis","archived":false,"fork":false,"pushed_at":"2022-07-04T08:43:57.000Z","size":24034,"stargazers_count":733,"open_issues_count":140,"forks_count":323,"subscribers_count":76,"default_branch":"master","last_synced_at":"2024-07-30T22:36:32.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kohler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-21T22:45:25.000Z","updated_at":"2024-07-21T12:24:57.000Z","dependencies_parsed_at":"2022-08-06T10:15:19.053Z","dependency_job_id":null,"html_url":"https://github.com/kohler/click","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohler%2Fclick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohler%2Fclick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohler%2Fclick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohler%2Fclick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kohler","download_url":"https://codeload.github.com/kohler/click/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493385,"owners_count":22080127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:03.640Z","updated_at":"2025-05-16T08:06:47.594Z","avatar_url":"https://github.com/kohler.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","\u003ca id=\"79499aeece9a2a9f64af6f61ee18cbea\"\u003e\u003c/a\u003e浏览嗅探\u0026\u0026流量拦截\u0026\u0026流量分析\u0026\u0026中间人","C++","\u003ca id=\"7bf0f5839fb2827fdc1b93ae6ac7f53d\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"99398a5a8aaf99228829dadff48fb6a7\"\u003e\u003c/a\u003e未分类-Network","\u003ca id=\"b346105580b0240d693020ce8719ebca\"\u003e\u003c/a\u003e未分类"],"readme":"The Click Modular Router\n========================\n[![build status](https://github.com/kohler/click/actions/workflows/ci.yml/badge.svg)](https://github.com/kohler/click/actions/workflows/ci.yml)\n\nClick is a modular router toolkit. To use it you'll need to know how to\ncompile and install the software, how to write router configurations, and how\nto write new elements. Our [ACM Transactions on Computer Systems paper](http://dl.acm.org/citation.cfm?id=354874)\nwill give you a feeling for what Click can do. Using the optimization tools\nunder `CLICKDIR/tools`, you can get even better performance than that paper\ndescribes.\n\nContents\n--------\n\nSubdirectory                  | Description\n----------------------------- | -------------------------------\n`CLICKDIR/apps`               | Click-related applications\n`CLICKDIR/apps/clicky`        | GTK+ program for displaying configurations and interacting with drivers\n`CLICKDIR/apps/csclient`      | Command-line program for interacting with drivers\n`CLICKDIR/apps/ClickController` | Java program for interacting with drivers\n`CLICKDIR/conf`               | example configuration files\n`CLICKDIR/doc`                | documentation\n`CLICKDIR/elements`           | element source code\n`CLICKDIR/elements/analysis`  | …for trace analysis and manipulation\n`CLICKDIR/elements/app`       | …for application-level protocols (e.g. FTP)\n`CLICKDIR/elements/aqm`       | …for active queue management (e.g. RED)\n`CLICKDIR/elements/ethernet`  | …for Ethernet\n`CLICKDIR/elements/etherswitch` | …for an Ethernet switch\n`CLICKDIR/elements/grid`      | …for the Grid mobile ad-hoc wireless network protocols\n`CLICKDIR/elements/icmp`      | …for ICMP\n`CLICKDIR/elements/ip`        | …for IPv4\n`CLICKDIR/elements/ip6`       | …for IPv6\n`CLICKDIR/elements/ipsec`     | …for IPsec\n`CLICKDIR/elements/linuxmodule` | …for the Linux kernel driver\n`CLICKDIR/elements/local`     | …for your own elements (empty)\n`CLICKDIR/elements/ns`        | …for the NS network simulator driver\n`CLICKDIR/elements/radio`     | …for communicating with wireless radios\n`CLICKDIR/elements/standard`  | …for simple protocol-generic elements\n`CLICKDIR/elements/tcpudp`    | …for TCP and UDP\n`CLICKDIR/elements/test`      | …for regression tests\n`CLICKDIR/elements/threads`   | …for thread management\n`CLICKDIR/elements/userlevel` | …for the user-level driver\n`CLICKDIR/elements/wifi`      | …for 802.11\n`CLICKDIR/etc/samplepackage`  | sample source code for Click element package\n`CLICKDIR/etc/samplellrpc`    | sample source code for reading Click LLRPCs\n`CLICKDIR/etc/diagrams`       | files for drawing Click diagrams\n`CLICKDIR/etc/libclick`       | files for standalone user-level Click library\n`CLICKDIR/include/click`      | common header files\n`CLICKDIR/include/clicknet`   | header files defining network headers\n`CLICKDIR/lib`                | common non-element source code\n`CLICKDIR/linuxmodule`        | Linux kernel module driver\n`CLICKDIR/ns`                 | NS driver (integrates with the NS simulator)\n`CLICKDIR/test`               | regression tests\n`CLICKDIR/tools`              | Click tools\n`CLICKDIR/tools/lib`          | …common code for tools\n`CLICKDIR/tools/click-align`  | …enforces alignment for non-x86 machines\n`CLICKDIR/tools/click-combine` | …merges routers into combined configuration\n`CLICKDIR/tools/click-devirtualize` | …removes virtual functions from source\n`CLICKDIR/tools/click-fastclassifier` | …specializes Classifiers into C++ code\n`CLICKDIR/tools/click-mkmindriver` | …build environments for minimal drivers\n`CLICKDIR/tools/click-install` | …installs configuration into kernel module\n`CLICKDIR/tools/click-pretty` | …pretty-prints Click configuration as HTML\n`CLICKDIR/tools/click-undead` | …removes dead code from configurations\n`CLICKDIR/tools/click-xform`  | …pattern-based configuration optimizer\n`CLICKDIR/tools/click2xml`    | …convert Click language \u003c-\u003e XML\n`CLICKDIR/userlevel`          | user-level driver\n\n\nDocumentation\n-------------\n\nThe `INSTALL.md` file in this directory contains installation instructions. User\ndocumentation is in the `doc` subdirectory, which contains manual pages for\nthe Click language, the Linux kernel module, and several tools; it also has a\nscript that generates manual pages for many of the elements distributed in\nthis package. To install these manual pages so you can read them, follow the\n`INSTALL.md` instructions, but `make install-man` instead of `make install`.\n\n\nRunning a Click Router\n----------------------\n\nBefore playing with a Click router, you should get familiar with the Click\nconfiguration language. You use this to tell Click how to process packets. The\nlanguage describes a graph of “elements,” or packet processing modules. See\nthe `doc/click.5` manual page for a detailed description, or check the `conf`\ndirectory for some simple examples.\n\nClick can be compiled as a user-level program or as a kernel module for Linux.\nEither driver can receive and send packets; the kernel module directly\ninteracts with device drivers, while the user-level driver uses packet sockets\n(on Linux) or the pcap library (everywhere else).\n\n### User-Level Program\n\nRun the user-level program by giving it the name of a configuration file:\n`click CONFIGFILE`.\n\n### Linux Kernel Module\n\nSee the `doc/click.o.8` manual page for a detailed description. To summarize,\ninstall a configuration by running `click-install CONFIGFILE`. This will also\ninstall the kernel module if necessary and report any errors to standard\nerror. (You must run `make install` before `click-install` will work.)\n\n### NS-3 Simulator\n\nSee `INSTALL.md` for more information. Further information on NS-3 and Click is\navailable in [the NS-3 manual](http://www.nsnam.org/docs/models/html/click.html).\n\n### NS-2 Simulator\n\nSee `INSTALL.md` for more information.  Once a Click-enabled version of NS-2 is\ninstalled, the 'ns' command is able to run Click scripts as part of a normal\nNS-2 simulation.\n\n### DPDK\n\nClick’s user-level driver supports DPDK. Before running in DPDK mode, the DPDK\nmust be set up properly as per the DPDK documentation. This mainly involves\nsetting up huge pages and binding some NIC to the DPDK userspace driver. E.g.,\nto set up huge pages:\n\n    echo 1024 \u003e /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages\n    mkdir -p /mnt/huge\n    mount -t hugetlbfs nodev /mnt/huge\n\nOn x86_64 you might achieve better performances with 1G huge pages, which must\nbe enabled through the kernel cmdline.\n\nIntel NICs use entierly userspace drivers and needs to be bound to DPDK.\nEg., to bind eth0 to DPDK:\n\n    modprobe uio_pci_generic\n    dpdk/tools/dpdk_nic_bind.py --bind=uio_pci_generic eth0\n\nRefer to the [DPDK documentation](https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html?highlight=hugepages) for more details about huge pages and binding\ndevices.\n\nUnlike most other DPDK applications, you have to pass DPDK EAL arguments\nbetween `--dpdk` and `--`, then pass Click arguments. As the DPDK EAL will\nhandle thread management instead of Click, Click's `-j`/`--threads` argument\nwill be disabled when `--dpdk` is active. You should give at least the\nfollowing two EAL arguments for best practice. This is required with older\nversions of DPDK, even if running on a single core:\n\n* `-c COREMASK`: hexadecimal bitmask of cores to run on\n* `-n NUM`: number of memory channels\n\nIf `-c` or `-l` is not provided, DPDK will use all available cores.\n\nA sample command to run a click configuration on 4 cores on a computer with 4\nmemory channels and listen for control connections on TCP port 8080 would be:\n\n    click --dpdk -c 0xf -n 4 -- -p 8080 configfile\n\nIf Click is launched without `--dpdk`, it will run in normal userlevel mode\nwithout involving DPDK EAL, meaning that any DPDK element will not work.\n\n### Configurations\n\nSome sample configurations are included in the `conf` directory, including a\nPerl script that generated the IP router configurations used in our TOCS paper\n(`conf/make-ip-conf.pl`) and a set of patterns for the `click-xform` pattern\noptimizer (`conf/ip.clickpat`).\n\n\nAdding Your Own Elements\n------------------------\n\nPlease see the FAQ in this directory to learn how to add elements to Click.\n\n\nCopyright and License\n---------------------\n\nMost of Click is distributed under the Click license, a version of the MIT\nLicense. See the `LICENSE` file for details. Each source file should identify\nits license. Source files that do not identify a specific license are covered\nby the Click license.\n\nParts of Click are distributed under different licenses. The specific licenses\nare listed below.\n\n* `drivers/e1000*`, `etc/linux-*-patch`, `linuxmodule/proclikefs.c`: These\n  portions of the Click software are derived from the Linux kernel, and are\n  thus distributed under the GNU General Public License, version 2. The GNU\n  General Public License is available [via the Web](http://www.gnu.org/licenses/gpl.html) and\n  in `etc/COPYING`.\n\n* `include/click/bigint.hh`: This portion of the Click software derives from\n  the GNU Multiple Precision Arithmetic Library, and is thus distributed under\n  the GNU Lesser General Public License, version 3. This license is available\n  [via the Web](http://www.gnu.org/licenses/lgpl.html) and in `etc/COPYING.lgpl`.\n\nElement code that uses only Click’s interfaces will *not* be derived from the\nLinux kernel. (For instance, those interfaces have multiple implementations,\nincluding some that run at user level.) Thus, for element code that uses only\nClick’s interfaces, the BSD-like Click license applies, not the GPL or the\nLGPL.\n\n\nBugs, Questions, etc.\n---------------------\n\nWe welcome bug reports, questions, comments, code, whatever you'd like to give\nus. GitHub issues are the best way to stay in touch.\n\n- The Click maintainers: [Eddie Kohler](http://www.read.seas.harvard.edu/~kohler/) and others\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkohler%2Fclick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkohler%2Fclick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkohler%2Fclick/lists"}