Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] large-file support?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Naveen Kumar Kaushik" <naveenk@xxxxxxxxxxxxx>
Date: Wed, 23 Jul 2003 14:39:23 +0530
I feel developers have not tried this. But it will always be good idea to
give large file support.
see foolowing messages for further details
http://ethereal.ntop.org/lists/ethereal-users/200111/msg00193.html
http://www.ethereal.com/lists/ethereal-dev/200305/msg00214.html

Naveen

----- Original Message -----
From: "Ben Greear" <greearb@xxxxxxxxxxxxxxx>
To: <ethereal-dev@xxxxxxxxxxxx>
Sent: Wednesday, July 23, 2003 1:04 PM
Subject: [Ethereal-dev] large-file support?


> Any particular reason why tethereal does not try to open
> files with O_LARGEFILE?
>
> I've implemented this in my own little packet capture reader
> (for a hacked up capture format of my own making), and it seems
> to work fine (at least on modern Linux).  When I convert
> my 4GB file to pcap format though, nothing can read it!
>
> In case someone is curious, here is how I open:
>
>     if ((fname == 0) || (strcmp(fname, "-") == 0)) {
>        in_fd = STDIN_FILENO;
>     }
>     else {
>        in_fd = open(fname, O_RDONLY|O_LARGEFILE);
>        if (in_fd < 0) {
>           fprintf(stderr, "ERROR:  Could not open file: %s, error: %s\n",
>                   fname, strerror(errno));
>           exit(errno);
>        }
>     }
>
>     if (ofname == 0) {
>        out_fd = STDOUT_FILENO;
>     }
>     else {
>        out_fd = open(ofname, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE);
>        if (out_fd < 0) {
>           fprintf(stderr, "ERROR:  Could not open output file: %s, error:
%s\n",
>                   ofname, strerror(errno));
>           exit(errno);
>        }
>     }
>
>
> Thanks,
> Ben
>
> --
> Ben Greear <greearb@xxxxxxxxxxxxxxx>       <Ben_Greear AT excite.com>
> President of Candela Technologies Inc      http://www.candelatech.com
> ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear
>
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>
>