Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/socketcand.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@

#undef DEBUG_RECEPTION

void state_bcm();
void state_raw();
void state_isotp();
void state_control();
void state_bcm(void);
void state_raw(void);
void state_isotp(void);
void state_control(void);
void tcp_quickack(int s);
void state_nobus();
void state_nobus(void);

extern int client_socket;
extern char **interface_names;
Expand Down
22 changes: 11 additions & 11 deletions src/socketcandcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ void sigint(int signum);
int receive_command(int socket, char *buf);
void state_connected();

int server_socket;
int raw_socket;
int port;
int verbose_flag = 0;
int cmd_index = 0;
int more_elements = 0;
int state, previous_state;
char ldev[IFNAMSIZ];
char rdev[IFNAMSIZ];
char buf[MAXLEN];
char cmd_buffer[MAXLEN];
static int server_socket;
static int raw_socket;
static int port;
static int verbose_flag = 0;
static int cmd_index = 0;
static int more_elements = 0;
static int state, previous_state;
static char ldev[IFNAMSIZ];
static char rdev[IFNAMSIZ];
static char buf[MAXLEN];
static char cmd_buffer[MAXLEN];

int main(int argc, char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion src/state_bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

int sc = -1;

void state_bcm()
void state_bcm(void)
{
int i, j, ret;
unsigned long long sec, usec;
Expand Down
2 changes: 1 addition & 1 deletion src/state_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>

void state_control()
void state_control(void)
{
char buf[MAXLEN];
int i, items;
Expand Down
2 changes: 1 addition & 1 deletion src/state_isotp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

int si = -1;

void state_isotp()
void state_isotp(void)
{
int i, items, ret;

Expand Down
22 changes: 11 additions & 11 deletions src/state_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
#include <linux/can.h>
#include <linux/can/raw.h>

int raw_socket;
struct ifreq ifr;
struct sockaddr_can addr;
struct msghdr msg;
struct can_frame frame;
struct iovec iov;
char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))];
struct timeval tv;
struct cmsghdr *cmsg;

void state_raw()
static int raw_socket;
static struct ifreq ifr;
static struct sockaddr_can addr;
static struct msghdr msg;
static struct can_frame frame;
static struct iovec iov;
static char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))];
static struct timeval tv;
static struct cmsghdr *cmsg;

void state_raw(void)
{
char buf[MAXLEN];
int i, ret, items;
Expand Down
2 changes: 1 addition & 1 deletion src/statistics.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

int statistics_ival = 0;

struct timeval last_fired;
static struct timeval last_fired;

void *statistics_loop(void *ptr)
{
Expand Down
Loading