commit
76002c0892
|
|
@ -175,7 +175,6 @@ static void sigterm(int signo)
|
||||||
|
|
||||||
static int idx2dindex(int ifidx, int socket)
|
static int idx2dindex(int ifidx, int socket)
|
||||||
{
|
{
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,13 +110,8 @@ static void print_frame(canid_t id, const uint8_t *data, int dlc, int inc_data)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_compare(
|
static void print_compare(canid_t exp_id, const uint8_t *exp_data, uint8_t exp_dlc,
|
||||||
canid_t exp_id,
|
canid_t rec_id, const uint8_t *rec_data, uint8_t rec_dlc,
|
||||||
const uint8_t *exp_data,
|
|
||||||
uint8_t exp_dlc,
|
|
||||||
canid_t rec_id,
|
|
||||||
const uint8_t *rec_data,
|
|
||||||
uint8_t rec_dlc,
|
|
||||||
int inc)
|
int inc)
|
||||||
{
|
{
|
||||||
printf("expected: ");
|
printf("expected: ");
|
||||||
|
|
|
||||||
1
cangen.c
1
cangen.c
|
|
@ -490,7 +490,6 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
while ((opt = getopt_long(argc, argv, "g:atefbER8mI:L:D:p:n:ixc:vh?", long_options, NULL)) != -1) {
|
while ((opt = getopt_long(argc, argv, "g:atefbER8mI:L:D:p:n:ixc:vh?", long_options, NULL)) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
gap = strtod(optarg, NULL);
|
gap = strtod(optarg, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,6 @@ void print_usage(char *prg)
|
||||||
" 1F334455#1122334455667788_B / 123#R / 00000123#R3 / 333#R8_E\n\n");
|
" 1F334455#1122334455667788_B / 123#R / 00000123#R3 / 333#R8_E\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int s; /* can raw socket */
|
int s; /* can raw socket */
|
||||||
|
|
@ -126,7 +124,6 @@ int main(int argc, char **argv)
|
||||||
addr.can_ifindex = ifr.ifr_ifindex;
|
addr.can_ifindex = ifr.ifr_ifindex;
|
||||||
|
|
||||||
if (required_mtu > (int)CAN_MTU) {
|
if (required_mtu > (int)CAN_MTU) {
|
||||||
|
|
||||||
/* check if the frame fits into the CAN netdevice */
|
/* check if the frame fits into the CAN netdevice */
|
||||||
if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
|
if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
|
||||||
perror("SIOCGIFMTU");
|
perror("SIOCGIFMTU");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue