Skip to content

Commit

Permalink
""
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Lightfoot committed Jun 10, 2002
1 parent 4b9ac93 commit 8c2f891
Show file tree
Hide file tree
Showing 19 changed files with 43 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Changelog for driftnet
$Id: CHANGES,v 1.11 2002/06/01 15:26:09 chris Exp $
$Id: CHANGES,v 1.12 2002/06/10 21:25:48 chris Exp $

0.1.5

Expand Down
4 changes: 2 additions & 2 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Credits and contributors for driftnet
$Id: CREDITS,v 1.5 2002/06/01 15:26:09 chris Exp $
$Id: CREDITS,v 1.6 2002/06/10 21:25:48 chris Exp $

Thanks to the authors of EtherPEG, for a cool idea, and to Eric Richardson,
whose website brought it to my attention.
Expand All @@ -10,5 +10,5 @@ Others certainly remain.
Jamie Zawinski for helpful suggestions and webcollage integration.

Eric Dobbs for fixing some portability issues and getting driftnet running on
Solaris.
Solaris and BSD systems.

9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Copyright (c) 2001 Chris Lightfoot. All rights reserved.
# Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
#
# $Id: Makefile,v 1.29 2002/06/05 11:34:49 chris Exp $
# $Id: Makefile,v 1.30 2002/06/10 21:25:48 chris Exp $
#


Expand Down Expand Up @@ -43,13 +43,16 @@ LDLIBS += -ljpeg -lungif `gtk-config --libs`

# On systems with a C99 compiler, driftnet will use <stdint.h> for the
# definitions of types such as uint8_t. On other systems like Solaris, these
# are in <sys/inttypes.h>, and you should uncomment this line.
#CFLAGS += -DUSE_SYS_INT_TYPES_H
# are in <sys/types.h>, and you should uncomment this line.
#CFLAGS += -DUSE_SYS_TYPES_H

# On Solaris, it is necessary to link against -lposix4 for the definition of
# nanosleep; uncomment the below.
#LDLIBS += -lposix4

# added 20020604 edobbs
# On BSD systems, may need to use /usr/local/include
#CFLAGS += -I/usr/local/include

#
# No user-serviceable parts below this point.
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
README for driftnet
$Id: README,v 1.6 2002/05/29 11:52:23 chris Exp $
$Id: README,v 1.7 2002/06/10 21:25:48 chris Exp $

Driftnet watches network traffic, and picks out and displays JPEG and GIF
images for display. It is an horrific invasion of privacy and shouldn't be used
Expand Down
2 changes: 1 addition & 1 deletion audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

static const char rcsid[] = "$Id: audio.c,v 1.2 2002/06/01 12:58:22 chris Exp $";
static const char rcsid[] = "$Id: audio.c,v 1.3 2002/06/10 21:25:48 chris Exp $";

#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
*/

static const char rcsid[] = "$Id: connection.c,v 1.1 2002/06/03 22:10:45 chris Exp $";
static const char rcsid[] = "$Id: connection.c,v 1.2 2002/06/10 21:25:48 chris Exp $";

#include <assert.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion display.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#ifndef NO_DISPLAY_WINDOW

static const char rcsid[] = "$Id: display.c,v 1.11 2002/06/01 12:58:22 chris Exp $";
static const char rcsid[] = "$Id: display.c,v 1.12 2002/06/10 21:25:48 chris Exp $";

#include <gtk/gtk.h>
#include <gdk/gdk.h>
Expand Down
4 changes: 3 additions & 1 deletion driftnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

static const char rcsid[] = "$Id: driftnet.c,v 1.22 2002/06/04 19:09:02 chris Exp $";
static const char rcsid[] = "$Id: driftnet.c,v 1.23 2002/06/10 21:25:48 chris Exp $";

#undef NDEBUG

Expand All @@ -16,6 +16,7 @@ static const char rcsid[] = "$Id: driftnet.c,v 1.22 2002/06/04 19:09:02 chris Ex
#include <errno.h>
#include <pcap.h>

#include <netinet/in.h> /* needs to be before <arpa/inet.h> on OpenBSD */
#include <arpa/inet.h>
#include <limits.h>

Expand Down Expand Up @@ -645,6 +646,7 @@ int main(int argc, char *argv[]) {
#endif /* !NO_DISPLAY_WINDOW */

/* Start up pcap. */

pc = pcap_open_live(interface, SNAPLEN, promisc, 1000, ebuf);
if (!pc) {
fprintf(stderr, PROGNAME": pcap_open_live: %s\n", ebuf);
Expand Down
3 changes: 2 additions & 1 deletion driftnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) 2001 Chris Lightfoot. All rights reserved.
* Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
*
* $Id: driftnet.h,v 1.6 2002/06/03 22:10:02 chris Exp $
* $Id: driftnet.h,v 1.7 2002/06/10 21:25:48 chris Exp $
*
*/

Expand All @@ -14,6 +14,7 @@

#define PROGNAME "driftnet"

#include <sys/types.h> /* added 20020604 edobbs for OpenBSD */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Expand Down
8 changes: 5 additions & 3 deletions endian.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@
*
*/

static const char rcsid[] = "$Id: endian.c,v 1.4 2002/06/05 00:29:43 chris Exp $";
static const char rcsid[] = "$Id: endian.c,v 1.5 2002/06/10 21:25:48 chris Exp $";

#include <stdio.h>
#ifdef USE_SYS_INT_TYPES_H
# include <sys/int_types.h> /* Solaris etc. */
#ifdef USE_SYS_TYPES_H
# include <sys/types.h> /* Solaris etc. */
#else
# include <stdint.h> /* C99 standard. */
#endif

int main(void) {
#if defined(LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN)
printf("-DDRIFTNET_LITTLE_ENDIAN\n");
return 0;
#elif defined(BIG_ENDIAN) || defined(_BIG_ENDIAN)
printf("-DDRIFTNET_BIG_ENDIAN\n");
return 0;
#else
uint32_t a = 0;
*((uint8_t*)&a) = 0xff;
Expand Down
2 changes: 1 addition & 1 deletion gif.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

static const char rcsid[] = "$Id: gif.c,v 1.2 2002/06/01 11:44:17 chris Exp $";
static const char rcsid[] = "$Id: gif.c,v 1.3 2002/06/10 21:25:48 chris Exp $";

#include <gif_lib.h>

Expand Down
2 changes: 1 addition & 1 deletion image.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

static const char rcsid[] = "$Id: image.c,v 1.7 2002/06/01 17:39:11 chris Exp $";
static const char rcsid[] = "$Id: image.c,v 1.8 2002/06/10 21:25:48 chris Exp $";

#include <stdio.h>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion img.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

static const char rcsid[] = "$Id: img.c,v 1.7 2002/06/01 11:44:17 chris Exp $";
static const char rcsid[] = "$Id: img.c,v 1.8 2002/06/10 21:25:48 chris Exp $";

#include <stdio.h>
#include <stdlib.h>
Expand Down
6 changes: 3 additions & 3 deletions img.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* Copyright (c) 2001 Chris Lightfoot. All rights reserved.
* Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
*
* $Id: img.h,v 1.5 2002/06/01 15:26:09 chris Exp $
* $Id: img.h,v 1.6 2002/06/10 21:25:48 chris Exp $
*
*/

#ifndef __IMG_H_ /* include guard */
#define __IMG_H_

#ifdef USE_SYS_INT_TYPES_H
# include <sys/int_types.h> /* Solaris etc. */
#ifdef USE_SYS_TYPES_H
# include <sys/types.h> /* Solaris etc. */
#else
# include <stdint.h> /* C99 standard */
#endif
Expand Down
2 changes: 1 addition & 1 deletion jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

static const char rcsid[] = "$Id: jpeg.c,v 1.3 2002/06/01 11:44:17 chris Exp $";
static const char rcsid[] = "$Id: jpeg.c,v 1.4 2002/06/10 21:25:48 chris Exp $";

#include <stdio.h>
#include <stdlib.h>
Expand Down
4 changes: 3 additions & 1 deletion media.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
*/

static const char rcsid[] = "$Id: media.c,v 1.1 2002/06/03 22:10:45 chris Exp $";
static const char rcsid[] = "$Id: media.c,v 1.2 2002/06/10 21:25:48 chris Exp $";

#include <assert.h>
#include <dirent.h>
Expand All @@ -17,6 +17,8 @@ static const char rcsid[] = "$Id: media.c,v 1.1 2002/06/03 22:10:45 chris Exp $"
#include <string.h>
#include <unistd.h>

#include <limits.h> /* added 20020603 edobbs for PATH_MAX on Solaris */

#include "driftnet.h"

extern char *tmpdir; /* in driftnet.c */
Expand Down
3 changes: 1 addition & 2 deletions mpeghdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
*
*/

static const char rcsid[] = "$Id: mpeghdr.c,v 1.3 2002/06/01 12:58:22 chris Exp $";
static const char rcsid[] = "$Id: mpeghdr.c,v 1.4 2002/06/10 21:25:48 chris Exp $";

#include <stdbool.h>
#include <stdio.h>

#include "mpeghdr.h"
Expand Down
18 changes: 8 additions & 10 deletions mpeghdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
* Copyright (c) 2002 Chris Lightfoot. All rights reserved.
* Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
*
* $Id: mpeghdr.h,v 1.2 2002/06/01 11:44:17 chris Exp $
* $Id: mpeghdr.h,v 1.3 2002/06/10 21:25:48 chris Exp $
*
*/

#ifndef __MPEGHDR_H_ /* include guard */
#define __MPEGHDR_H_

#include <stdbool.h>

#ifdef USE_SYS_INT_TYPES_H
#include <sys/int_types.h> /* Solaris etc. */
#ifdef USE_SYS_TYPES_H
# include <sys/types.h> /* Solaris etc. */
#else
#include <stdint.h> /* C99 standard. */
# include <stdint.h> /* C99 standard. */
#endif

#include <stdio.h>
Expand All @@ -28,21 +26,21 @@ struct mpeg_audio_hdr {
enum { m_vers_unknown = 0, m_vers_1, m_vers_2, m_vers_2_5 } version;
enum { m_layer_unknown = 0, m_layer_1, m_layer_2, m_layer_3 } layer;

bool has_crc;
int has_crc;
uint16_t crc;

int bitrate;
int samplerate;

bool padded;
int padded;

bool priv;
int priv;

enum { m_chan_stereo = 0, m_chan_joint, m_chan_dual, m_chan_mono} channels;

uint8_t mode_extn;

bool copyr, original;
int copyr, original;

uint8_t emph;
};
Expand Down
2 changes: 1 addition & 1 deletion png.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
*
*/

static const char rcsid[] = "$Id: png.c,v 1.2 2002/06/01 11:44:17 chris Exp $";
static const char rcsid[] = "$Id: png.c,v 1.3 2002/06/10 21:25:48 chris Exp $";

0 comments on commit 8c2f891

Please sign in to comment.