Giter Site home page Giter Site logo

gulp's People

Contributors

carstengrohmann avatar jmakov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gulp's Issues

net.core.rmem_default too small?

Hello Jernej,

the value of rmem_default is just 1/10 of the default in tcp_rmem (12582912 vs 125829120) is this intended or a typo?

gulp/scripts/install.sh

Lines 31 to 32 in 33fcc15

echo 'net.core.rmem_default=12582912' | $SYSCTL_APPEND_COMMAND
echo 'net.ipv4.tcp_rmem= 12582912 125829120 1258291200' | $SYSCTL_APPEND_COMMAND

Regards,
Carsten

gulp requires root to run

The following settings are apparently insufficient:

sudo groupadd pcap
sudo usermod -a -G pcap $USER
sudo chgrp pcap gulp
sudo setcap cap_net_raw,cap_net_admin=eip gulp

since we still get this output when running gulp without sudo:

./gulp: Warning: could not lock ring buffer into RAM
./gulp: Reader could not set scheduling priority: Permission denied

How to use pcap file as input instead of interface

Hello,

I have a tcpdump capture of erspan traffic.
I would like to pass it through gulp to decapsulte the erspan headers
and output the result back into a pcap file for further analysis with wireshark.

How can I do that?

Thanks,

create pcap file "per flow"

I would like to have a pcap file created for each src-ip:port/dst-ip:port combination, or just ip address at a minimum, for all tcp and udp packets. I am not a c++ developer but I was able to make this work in principle with a test program. here's the relevant part of the code:

` if (ip->ip_p == 6 /* tcp protocol number */) {
//printf("\ntcp!\n");

        char srcname[100];
        strcpy(srcname, inet_ntoa(ip->ip_src));
        char dstname[100];
        strcpy(dstname, inet_ntoa(ip->ip_dst));
        
        
        int &stored_val = map[dstname];
        
        
        oss << "/" << odest << "/"<< dstname << "-" << stored_val << ".pcap";
        pfile = oss.str();

        if (GetFileSize(pfile) >= 0) {
            dumpfile= pcap_dump_open_append(fp, pfile.c_str());
        }
        else {
            dumpfile= pcap_dump_open(fp, pfile.c_str());
            
        }
        pcap_dump((unsigned char *) dumpfile, header, pkt_data);
        
        
    }

    else if (ip->ip_p == 17 /* tcp protocol number */) {
        //printf("\nudp!\n");
        

        char srcname[100];
        strcpy(srcname, inet_ntoa(ip->ip_src));
        char dstname[100];
        strcpy(dstname, inet_ntoa(ip->ip_dst));
        
        
        int &stored_val = map[dstname];
        
        oss << "/" << odest << "/"<< dstname << "-" << stored_val << ".pcap";
        pfile = oss.str();

        if (GetFileSize(pfile) >= 0) {
            dumpfile= pcap_dump_open_append(fp, pfile.c_str());
        }
        else {
            dumpfile= pcap_dump_open(fp, pfile.c_str());
            
        }
        `

My program loses a lot of packets under load however, hence why I looked to yours for some insipiration on how to optimize. This is all still quite a bit over my head though. Do you think it would be possible to add a feature that would write to a file based on the ip:port information it receives in the header?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.