Skip to content

Packet capture library for Linux, macOS and other Unix

License

Notifications You must be signed in to change notification settings

WireCroc/libwrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libwrc

Packet capture library.

Installation

  1. Run make install

Usage

#include <wrc/wrc.h>

Example

int main(void) {
    wrc cap;
    wc_iflist ifc = wrc_get_interfaces();
    
    wrc_default(&cap);

    int opts = wrc_setopts(&cap, ifc.ifc[1], PA_NULL, 0);
    if (opts != 0) {
        printf("setopts error\n");
        exit(0);
    }

    wrc_cap(&cap, WCFILE, NULL, DEFAULT_CAP);
    
    wrc_destroy(&cap);
    
    return 0;
}

Development

$ make lib

Contributing

  1. Fork it (https://github.com/wirecroc/libwrc/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

Packet capture library for Linux, macOS and other Unix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published