2
* packETH - ethernet packet generator
3
* By Miha Jemec <jemcekvgmail.com>
4
* Copyright 2003 Miha Jemec, Iskratel
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
signed int char2x(char *p);
27
guint32 get_checksum32(int start, int stop);
28
guint16 get_checksum16(int start, int stop);
29
char *c8(char *s, unsigned char x);
30
unsigned char linear2alaw(int pcm_val);
31
unsigned char linear2ulaw(short pcm_val);
32
short search(int val, short *table, int size);
33
int insert_frequency(int codec, int frequency, int length, GtkWidget *payload_entry, gint amp_index);
34
int check_mac_address(gchar *ptr);
35
int check_ip_address(gchar *ptr);
36
int send_packet(GtkButton *button, gpointer user_data);
37
int make_packet(GtkButton *button, gpointer user_data);
38
int link_level_get(GtkButton *button, gpointer user_data);
39
int get_network_payload(GtkButton *button, gpointer user_data, int length, int max, gchar *entry);
40
int get_mac_from_string(GtkButton *button);
41
int get_8021q(GtkButton *button);
42
int get_8023(GtkButton *button);
43
int arp_get(GtkButton *button, gpointer user_data);
44
int ipv4_get(GtkButton *button, gpointer user_data);
45
int udp_get(GtkButton *button, gpointer user_data, guint32 pseudo_header_sum);
46
int tcp_get(GtkButton *button, gpointer user_data, guint32 pseudo_header_sum);
47
int icmp_get(GtkButton *button, gpointer user_data);
48
int igmp_get(GtkButton *button, gpointer user_data);
49
int check_digit(char *field, int length, char *text);
50
int check_if_file_is_packet(FILE *file_p);
51
int check_hex(char *field, int length, char *text);
52
void statusbar_text(GtkButton *button, char *text);
53
void gen_crc32_table(void);
54
unsigned long get_crc32(unsigned char *p, int len);