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 4848
4949#undef DEBUG_RECEPTION
5050
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 );
5555void tcp_quickack (int s );
56- void state_nobus ();
56+ void state_nobus (void );
5757
5858extern int client_socket ;
5959extern char * * interface_names ;
Original file line number Diff line number Diff line change @@ -60,17 +60,17 @@ void sigint(int signum);
6060int receive_command (int socket , char * buf );
6161void state_connected ();
6262
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 ];
7474
7575int main (int argc , char * * argv )
7676{
Original file line number Diff line number Diff line change 2929
3030int sc = -1 ;
3131
32- void state_bcm ()
32+ void state_bcm (void )
3333{
3434 int i , j , ret ;
3535 unsigned long long sec , usec ;
Original file line number Diff line number Diff line change 1919#include <netinet/in.h>
2020#include <arpa/inet.h>
2121
22- void state_control ()
22+ void state_control (void )
2323{
2424 char buf [MAXLEN ];
2525 int i , items ;
Original file line number Diff line number Diff line change 2626
2727int si = -1 ;
2828
29- void state_isotp ()
29+ void state_isotp (void )
3030{
3131 int i , items , ret ;
3232
Original file line number Diff line number Diff line change 2323#include <linux/can.h>
2424#include <linux/can/raw.h>
2525
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 )
3737{
3838 char buf [MAXLEN ];
3939 int i , ret , items ;
Original file line number Diff line number Diff line change 1414
1515int statistics_ival = 0 ;
1616
17- struct timeval last_fired ;
17+ static struct timeval last_fired ;
1818
1919void * statistics_loop (void * ptr )
2020{
You can’t perform that action at this time.
0 commit comments