Data Structures | Defines | Typedefs | Functions | Variables

StufferUdpReceiver.cc File Reference

A brief file description. More...

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <assert.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
Include dependency graph for StufferUdpReceiver.cc:

Go to the source code of this file.

Data Structures

struct  prefetch_udp_header
struct  Stream
class  StreamHashTable

Defines

#define Debug(print)   do { if (debug_on) printf print; } while (0)
#define UDP_BUF_SIZE   (64 * 1024)
#define TSPORT   39679
#define STREAM_TIMEOUT_SECS   6000
#define RESPONSE_FLAG   (1<<31)
#define LAST_PKT_FLAG   (1<<30)
#define PKT_NUM_MASK   ((1<<30)-1)
#define PACKET_HDR_SIZE   20

Typedefs

typedef unsigned int uint32

Functions

int stufferUdpStatShow ()
int openTSConn ()
int processPacket (const char *packet, int pkt_sz)
int main (int argc, char *argv[])

Variables

int debug_on = 0
static int number_of_packets_received = 0
static int number_of_packets_dropped = 0
static int number_of_connections_to_ts = 0
static int number_of_timeouts = 0
StreamHashTablestream_hash_table

Detailed Description

A brief file description.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file StufferUdpReceiver.cc.


Define Documentation

#define Debug (   print  )     do { if (debug_on) printf print; } while (0)

Definition at line 41 of file StufferUdpReceiver.cc.

Referenced by main(), and processPacket().

#define LAST_PKT_FLAG   (1<<30)

Definition at line 59 of file StufferUdpReceiver.cc.

Referenced by processPacket().

#define PACKET_HDR_SIZE   20

Definition at line 62 of file StufferUdpReceiver.cc.

#define PKT_NUM_MASK   ((1<<30)-1)

Definition at line 60 of file StufferUdpReceiver.cc.

Referenced by processPacket().

#define RESPONSE_FLAG   (1<<31)

Definition at line 58 of file StufferUdpReceiver.cc.

Referenced by processPacket().

#define STREAM_TIMEOUT_SECS   6000

Definition at line 47 of file StufferUdpReceiver.cc.

Referenced by StreamHashTable::deleteStaleStreams(), and main().

#define TSPORT   39679

Definition at line 45 of file StufferUdpReceiver.cc.

Referenced by openTSConn().

#define UDP_BUF_SIZE   (64 * 1024)

Definition at line 44 of file StufferUdpReceiver.cc.

Referenced by main().


Typedef Documentation

typedef unsigned int uint32

Definition at line 48 of file StufferUdpReceiver.cc.


Function Documentation

int main ( int  argc,
char *  argv[] 
)
int openTSConn (  ) 

Definition at line 183 of file StufferUdpReceiver.cc.

References number_of_connections_to_ts, and TSPORT.

Referenced by processPacket().

int processPacket ( const char *  packet,
int  pkt_sz 
)
int stufferUdpStatShow (  ) 

Variable Documentation

int debug_on = 0

Definition at line 42 of file StufferUdpReceiver.cc.

Referenced by main().

int number_of_connections_to_ts = 0 [static]

Definition at line 67 of file StufferUdpReceiver.cc.

Referenced by openTSConn(), and stufferUdpStatShow().

int number_of_packets_dropped = 0 [static]

Definition at line 66 of file StufferUdpReceiver.cc.

Referenced by processPacket(), and stufferUdpStatShow().

int number_of_packets_received = 0 [static]

Definition at line 65 of file StufferUdpReceiver.cc.

Referenced by processPacket(), and stufferUdpStatShow().

int number_of_timeouts = 0 [static]

Definition at line 128 of file StufferUdpReceiver.cc.