File tree Expand file tree Collapse file tree 7 files changed +31
-31
lines changed Expand file tree Collapse file tree 7 files changed +31
-31
lines changed Original file line number Diff line number Diff line change 48
48
49
49
#undef DEBUG_RECEPTION
50
50
51
- void state_bcm ();
52
- void state_raw ();
53
- void state_isotp ();
54
- void state_control ();
51
+ void state_bcm (void );
52
+ void state_raw (void );
53
+ void state_isotp (void );
54
+ void state_control (void );
55
55
void tcp_quickack (int s );
56
- void state_nobus ();
56
+ void state_nobus (void );
57
57
58
58
extern int client_socket ;
59
59
extern char * * interface_names ;
Original file line number Diff line number Diff line change @@ -60,17 +60,17 @@ void sigint(int signum);
60
60
int receive_command (int socket , char * buf );
61
61
void state_connected ();
62
62
63
- int server_socket ;
64
- int raw_socket ;
65
- int port ;
66
- int verbose_flag = 0 ;
67
- int cmd_index = 0 ;
68
- int more_elements = 0 ;
69
- int state , previous_state ;
70
- char ldev [IFNAMSIZ ];
71
- char rdev [IFNAMSIZ ];
72
- char buf [MAXLEN ];
73
- char cmd_buffer [MAXLEN ];
63
+ static int server_socket ;
64
+ static int raw_socket ;
65
+ static int port ;
66
+ static int verbose_flag = 0 ;
67
+ static int cmd_index = 0 ;
68
+ static int more_elements = 0 ;
69
+ static int state , previous_state ;
70
+ static char ldev [IFNAMSIZ ];
71
+ static char rdev [IFNAMSIZ ];
72
+ static char buf [MAXLEN ];
73
+ static char cmd_buffer [MAXLEN ];
74
74
75
75
int main (int argc , char * * argv )
76
76
{
Original file line number Diff line number Diff line change 29
29
30
30
int sc = -1 ;
31
31
32
- void state_bcm ()
32
+ void state_bcm (void )
33
33
{
34
34
int i , j , ret ;
35
35
unsigned long long sec , usec ;
Original file line number Diff line number Diff line change 19
19
#include <netinet/in.h>
20
20
#include <arpa/inet.h>
21
21
22
- void state_control ()
22
+ void state_control (void )
23
23
{
24
24
char buf [MAXLEN ];
25
25
int i , items ;
Original file line number Diff line number Diff line change 26
26
27
27
int si = -1 ;
28
28
29
- void state_isotp ()
29
+ void state_isotp (void )
30
30
{
31
31
int i , items , ret ;
32
32
Original file line number Diff line number Diff line change 23
23
#include <linux/can.h>
24
24
#include <linux/can/raw.h>
25
25
26
- int raw_socket ;
27
- struct ifreq ifr ;
28
- struct sockaddr_can addr ;
29
- struct msghdr msg ;
30
- struct can_frame frame ;
31
- struct iovec iov ;
32
- char ctrlmsg [CMSG_SPACE (sizeof (struct timeval )) + CMSG_SPACE (sizeof (__u32 ))];
33
- struct timeval tv ;
34
- struct cmsghdr * cmsg ;
35
-
36
- void state_raw ()
26
+ static int raw_socket ;
27
+ static struct ifreq ifr ;
28
+ static struct sockaddr_can addr ;
29
+ static struct msghdr msg ;
30
+ static struct can_frame frame ;
31
+ static struct iovec iov ;
32
+ static char ctrlmsg [CMSG_SPACE (sizeof (struct timeval )) + CMSG_SPACE (sizeof (__u32 ))];
33
+ static struct timeval tv ;
34
+ static struct cmsghdr * cmsg ;
35
+
36
+ void state_raw (void )
37
37
{
38
38
char buf [MAXLEN ];
39
39
int i , ret , items ;
Original file line number Diff line number Diff line change 14
14
15
15
int statistics_ival = 0 ;
16
16
17
- struct timeval last_fired ;
17
+ static struct timeval last_fired ;
18
18
19
19
void * statistics_loop (void * ptr )
20
20
{
You can’t perform that action at this time.
0 commit comments