To anyone that can answer this:
Are the differences great between the ANSI and K&R standard? What are some of the major differences between them??
-REM (1 Reply)
Dear All,
I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
can somebody explain about the ANSI C vs POSIX. say i was using open and fopen, i know that open is POSIX, and fopen is ANSI C. i read that that POSIX is a system call and ANSI C is like a standard library function. wouldn't the fopen function has to call on open function anyway to open any kind... (2 Replies)
hi , I came acroos two functions fdopen() and freopen().
what is the difference between these two functions and where can they be used. Is it that fdopen() is used to write freopen().
Advance Thanks for your co-operation.
:) (1 Reply)
Good Day
I downloaded Server Evaluation copy of C/ANSI compiler, but when I try to compile a file with it, it gives me following error - (for HP-UX 11.11 v1 PA-RISC)
Internal Error: Codeword file /opt/ansic/newconfig/ansic.cwd missing or empty.
Detailed Errors are as follows
Internal... (3 Replies)
I am a student. And need help on following program. I want to make a c program.
I have to scan a sentence and I have to interchange a word from that sentence.
Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Hi,
I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this?
Thanks,
Sunil (0 Replies)
I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry?
Only print out:
Thread ID: 0 START!
Thread ID: 0 END!
Thread ID: 0 START!... (2 Replies)
Discussion started by: sehang
2 Replies
LEARN ABOUT FREEBSD
pcap_open_offline
PCAP_OPEN_OFFLINE(3) Library Functions Manual PCAP_OPEN_OFFLINE(3)NAME
pcap_open_offline, pcap_open_offline_with_tstamp_precision, pcap_fopen_offline, pcap_fopen_offline_with_tstamp_precision - open a saved
capture file for reading
SYNOPSIS
#include <pcap/pcap.h>
char errbuf[PCAP_ERRBUF_SIZE];
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
pcap_t *pcap_open_offline_with_tstamp_precision(const char *fname,
u_int precision, char *errbuf);
pcap_t *pcap_fopen_offline(FILE *fp, char *errbuf);
pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *fp,
u_int precision, char *errbuf);
DESCRIPTION
pcap_open_offline() and pcap_open_offline_with_tstamp_precision() are called to open a ``savefile'' for reading.
fname specifies the name of the file to open. The file can have the pcap file format as described in pcap-savefile(5), which is the file
format used by, among other programs, tcpdump(1) and tcpslice(1), or can have the pcap-ng file format, although not all pcap-ng files can
be read. The name "-" is a synonym for stdin.
pcap_open_offline_with_tstamp_precision() takes an additional precision argument specifying the time stamp precision desired; if
PCAP_TSTAMP_PRECISION_MICRO is specified, packet time stamps will be supplied in seconds and microseconds, and if PCAP_TSTAMP_PRECI-
SION_NANO is specified, packet time stamps will be supplied in seconds and nanoseconds. If the time stamps in the file do not have the
same precision as the requested precision, they will be scaled up or down as necessary before being supplied.
Alternatively, you may call pcap_fopen_offline() or pcap_fopen_offline_with_tstamp_precision() to read dumped data from an existing open
stream fp. pcap_fopen_offline_with_tstamp_precision() takes an additional precision argument as described above. Note that on Windows,
that stream should be opened in binary mode.
RETURN VALUE
pcap_open_offline(), pcap_open_offline_with_tstamp_precision(), pcap_fopen_offline(), and pcap_fopen_offline_with_tstamp_precision() return
a pcap_t * on success and NULL on failure. If NULL is returned, errbuf is filled in with an appropriate error message. errbuf is assumed
to be able to hold at least PCAP_ERRBUF_SIZE chars.
SEE ALSO pcap(3), pcap-savefile(5)
1 July 2013 PCAP_OPEN_OFFLINE(3)