4 * Copyright (c) 2002-2009 Volkswagen Group Electronic Research
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of Volkswagen nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * Alternatively, provided that this notice is retained in full, this
20 * software may be distributed under the terms of the GNU General
21 * Public License ("GPL") version 2, in which case the provisions of the
22 * GPL apply INSTEAD OF those given above.
24 * The provided data structures and external interfaces from this code
25 * are not restricted to be used by modules with a GPL compatible license.
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
40 * Send feedback to <linux-can@vger.kernel.org>
56 #include <sys/types.h>
57 #include <sys/socket.h>
58 #include <sys/ioctl.h>
62 #include <linux/can.h>
63 #include <linux/can/raw.h>
68 #define MAXSOCK 16 /* max. number of CAN interfaces given on the cmdline */
69 #define MAXIFNAMES 30 /* size of receive name index to omit ioctls */
70 #define MAXCOL 6 /* number of different colors for colorized output */
71 #define ANYDEV "any" /* name of interface to receive from any CAN interface */
72 #define ANL "\r\n" /* newline in ASC mode */
74 #define SILENT_INI 42 /* detect user setting on commandline */
75 #define SILENT_OFF 0 /* no silent mode */
76 #define SILENT_ANI 1 /* silent mode with animation */
77 #define SILENT_ON 2 /* silent mode (completely silent) */
80 #define RED ATTBOLD FGRED
81 #define GREEN ATTBOLD FGGREEN
82 #define YELLOW ATTBOLD FGYELLOW
83 #define BLUE ATTBOLD FGBLUE
84 #define MAGENTA ATTBOLD FGMAGENTA
85 #define CYAN ATTBOLD FGCYAN
87 const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};
88 const char col_off [] = ATTRESET;
90 static char *cmdlinename[MAXSOCK];
91 static __u32 dropcnt[MAXSOCK];
92 static __u32 last_dropcnt[MAXSOCK];
93 static char devname[MAXIFNAMES][IFNAMSIZ+1];
94 static int dindex[MAXIFNAMES];
95 static int max_devname_len; /* to prevent frazzled device name output */
96 const int canfd_on = 1;
99 const char anichar[MAXANI] = {'|', '/', '-', '\\'};
100 const char extra_m_info[4][4] = {"- -", "B -", "- E", "B E"};
102 extern int optind, opterr, optopt;
104 static volatile int running = 1;
106 void print_usage(char *prg)
108 fprintf(stderr, "\nUsage: %s [options] <CAN interface>+\n", prg);
109 fprintf(stderr, " (use CTRL-C to terminate %s)\n\n", prg);
110 fprintf(stderr, "Options: -t <type> (timestamp: (a)bsolute/(d)elta/(z)ero/(A)bsolute w date)\n");
111 fprintf(stderr, " -c (increment color mode level)\n");
112 fprintf(stderr, " -i (binary output - may exceed 80 chars/line)\n");
113 fprintf(stderr, " -a (enable additional ASCII output)\n");
114 fprintf(stderr, " -S (swap byte order in printed CAN data[] - marked with '%c' )\n", SWAP_DELIMITER);
115 fprintf(stderr, " -s <level> (silent mode - %d: off (default) %d: animation %d: silent)\n", SILENT_OFF, SILENT_ANI, SILENT_ON);
116 fprintf(stderr, " -b <can> (bridge mode - send received frames to <can>)\n");
117 fprintf(stderr, " -B <can> (bridge mode - like '-b' with disabled loopback)\n");
118 fprintf(stderr, " -u <usecs> (delay bridge forwarding by <usecs> microseconds)\n");
119 fprintf(stderr, " -l (log CAN-frames into file. Sets '-s %d' by default)\n", SILENT_ON);
120 fprintf(stderr, " -L (use log file format on stdout)\n");
121 fprintf(stderr, " -n <count> (terminate after receiption of <count> CAN frames)\n");
122 fprintf(stderr, " -r <size> (set socket receive buffer to <size>)\n");
123 fprintf(stderr, " -d (monitor dropped CAN frames)\n");
124 fprintf(stderr, " -e (dump CAN error frames in human-readable format)\n");
125 fprintf(stderr, " -x (print extra message infos, rx/tx brs esi)\n");
126 fprintf(stderr, " -T <msecs> (terminate after <msecs> without any reception)\n");
127 fprintf(stderr, "\n");
128 fprintf(stderr, "Up to %d CAN interfaces with optional filter sets can be specified\n", MAXSOCK);
129 fprintf(stderr, "on the commandline in the form: <ifname>[,filter]*\n");
130 fprintf(stderr, "\nComma separated filters can be specified for each given CAN interface:\n");
131 fprintf(stderr, " <can_id>:<can_mask> (matches when <received_can_id> & mask == can_id & mask)\n");
132 fprintf(stderr, " <can_id>~<can_mask> (matches when <received_can_id> & mask != can_id & mask)\n");
133 fprintf(stderr, " #<error_mask> (set error frame filter, see include/linux/can/error.h)\n");
134 fprintf(stderr, " [j|J] (join the given CAN filters - logical AND semantic)\n");
135 fprintf(stderr, "\nCAN IDs, masks and data content are given and expected in hexadecimal values.\n");
136 fprintf(stderr, "When can_id and can_mask are both 8 digits, they are assumed to be 29 bit EFF.\n");
137 fprintf(stderr, "Without any given filter all data frames are received ('0:0' default filter).\n");
138 fprintf(stderr, "\nUse interface name '%s' to receive from all CAN interfaces.\n", ANYDEV);
139 fprintf(stderr, "\nExamples:\n");
140 fprintf(stderr, "%s -c -c -ta can0,123:7FF,400:700,#000000FF can2,400~7F0 can3 can8\n", prg);
141 fprintf(stderr, "%s -l any,0~0,#FFFFFFFF (log only error frames but no(!) data frames)\n", prg);
142 fprintf(stderr, "%s -l any,0:0,#FFFFFFFF (log error frames and also all data frames)\n", prg);
143 fprintf(stderr, "%s vcan2,92345678:DFFFFFFF (match only for extended CAN ID 12345678)\n", prg);
144 fprintf(stderr, "%s vcan2,123:7FF (matches CAN ID 123 - including EFF and RTR frames)\n", prg);
145 fprintf(stderr, "%s vcan2,123:C00007FF (matches CAN ID 123 - only SFF and non-RTR frames)\n", prg);
146 fprintf(stderr, "\n");
149 void sigterm(int signo)
154 int idx2dindex(int ifidx, int socket) {
159 for (i=0; i < MAXIFNAMES; i++) {
160 if (dindex[i] == ifidx)
164 /* create new interface index cache entry */
166 /* remove index cache zombies first */
167 for (i=0; i < MAXIFNAMES; i++) {
169 ifr.ifr_ifindex = dindex[i];
170 if (ioctl(socket, SIOCGIFNAME, &ifr) < 0)
175 for (i=0; i < MAXIFNAMES; i++)
176 if (!dindex[i]) /* free entry */
179 if (i == MAXIFNAMES) {
180 fprintf(stderr, "Interface index cache only supports %d interfaces.\n",
187 ifr.ifr_ifindex = ifidx;
188 if (ioctl(socket, SIOCGIFNAME, &ifr) < 0)
189 perror("SIOCGIFNAME");
191 if (max_devname_len < strlen(ifr.ifr_name))
192 max_devname_len = strlen(ifr.ifr_name);
194 strcpy(devname[i], ifr.ifr_name);
197 printf("new index %d (%s)\n", i, devname[i]);
203 int main(int argc, char **argv)
208 useconds_t bridge_delay = 0;
209 unsigned char timestamp = 0;
210 unsigned char dropmonitor = 0;
211 unsigned char extra_msg_info = 0;
212 unsigned char silent = SILENT_INI;
213 unsigned char silentani = 0;
214 unsigned char color = 0;
215 unsigned char view = 0;
216 unsigned char log = 0;
217 unsigned char logfrmt = 0;
221 int currmax, numfilter;
224 struct sockaddr_can addr;
225 char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))];
228 struct cmsghdr *cmsg;
229 struct can_filter *rfilter;
230 can_err_mask_t err_mask;
231 struct canfd_frame frame;
232 int nbytes, i, maxdlen;
234 struct timeval tv, last_tv;
235 struct timeval timeout, timeout_config = { 0, 0 }, *timeout_current = NULL;
236 FILE *logfile = NULL;
238 signal(SIGTERM, sigterm);
239 signal(SIGHUP, sigterm);
240 signal(SIGINT, sigterm);
245 while ((opt = getopt(argc, argv, "t:ciaSs:b:B:u:ldxLn:r:heT:?")) != -1) {
248 timestamp = optarg[0];
249 if ((timestamp != 'a') && (timestamp != 'A') &&
250 (timestamp != 'd') && (timestamp != 'z')) {
251 fprintf(stderr, "%s: unknown timestamp mode '%c' - ignored\n",
252 basename(argv[0]), optarg[0]);
262 view |= CANLIB_VIEW_BINARY;
266 view |= CANLIB_VIEW_ASCII;
270 view |= CANLIB_VIEW_SWAP;
274 view |= CANLIB_VIEW_ERROR;
278 silent = atoi(optarg);
279 if (silent > SILENT_ON) {
280 print_usage(basename(argv[0]));
287 if (strlen(optarg) >= IFNAMSIZ) {
288 fprintf(stderr, "Name of CAN device '%s' is too long!\n\n", optarg);
291 bridge = socket(PF_CAN, SOCK_RAW, CAN_RAW);
293 perror("bridge socket");
296 addr.can_family = AF_CAN;
297 strcpy(ifr.ifr_name, optarg);
298 if (ioctl(bridge, SIOCGIFINDEX, &ifr) < 0)
299 perror("SIOCGIFINDEX");
300 addr.can_ifindex = ifr.ifr_ifindex;
302 if (!addr.can_ifindex) {
303 perror("invalid bridge interface");
307 /* disable default receive filter on this write-only RAW socket */
308 setsockopt(bridge, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
311 const int loopback = 0;
313 setsockopt(bridge, SOL_CAN_RAW, CAN_RAW_LOOPBACK,
314 &loopback, sizeof(loopback));
317 if (bind(bridge, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
318 perror("bridge bind");
325 bridge_delay = (useconds_t)strtoul(optarg, (char **)NULL, 10);
345 count = atoi(optarg);
347 print_usage(basename(argv[0]));
353 rcvbuf_size = atoi(optarg);
354 if (rcvbuf_size < 1) {
355 print_usage(basename(argv[0]));
362 timeout_config.tv_usec = strtol(optarg, NULL, 0);
364 print_usage(basename(argv[0]));
367 timeout_config.tv_sec = timeout_config.tv_usec / 1000;
368 timeout_config.tv_usec = (timeout_config.tv_usec % 1000) * 1000;
369 timeout_current = &timeout;
372 print_usage(basename(argv[0]));
378 if (optind == argc) {
379 print_usage(basename(argv[0]));
383 if (logfrmt && view) {
384 fprintf(stderr, "Log file format selected: Please disable ASCII/BINARY/SWAP options!\n");
388 if (silent == SILENT_INI) {
390 fprintf(stderr, "Disabled standard output while logging.\n");
391 silent = SILENT_ON; /* disable output on stdout */
393 silent = SILENT_OFF; /* default output */
396 currmax = argc - optind; /* find real number of CAN devices */
398 if (currmax > MAXSOCK) {
399 fprintf(stderr, "More than %d CAN devices given on commandline!\n", MAXSOCK);
403 for (i=0; i < currmax; i++) {
405 ptr = argv[optind+i];
406 nptr = strchr(ptr, ',');
409 printf("open %d '%s'.\n", i, ptr);
412 s[i] = socket(PF_CAN, SOCK_RAW, CAN_RAW);
418 cmdlinename[i] = ptr; /* save pointer to cmdline name of this socket */
421 nbytes = nptr - ptr; /* interface name is up the first ',' */
423 nbytes = strlen(ptr); /* no ',' found => no filter definitions */
425 if (nbytes >= IFNAMSIZ) {
426 fprintf(stderr, "name of CAN device '%s' is too long!\n", ptr);
430 if (nbytes > max_devname_len)
431 max_devname_len = nbytes; /* for nice printing */
433 addr.can_family = AF_CAN;
435 memset(&ifr.ifr_name, 0, sizeof(ifr.ifr_name));
436 strncpy(ifr.ifr_name, ptr, nbytes);
439 printf("using interface name '%s'.\n", ifr.ifr_name);
442 if (strcmp(ANYDEV, ifr.ifr_name)) {
443 if (ioctl(s[i], SIOCGIFINDEX, &ifr) < 0) {
444 perror("SIOCGIFINDEX");
447 addr.can_ifindex = ifr.ifr_ifindex;
449 addr.can_ifindex = 0; /* any can interface */
453 /* found a ',' after the interface name => check for filters */
455 /* determine number of filters to alloc the filter space */
460 ptr++; /* hop behind the ',' */
461 ptr = strchr(ptr, ','); /* exit condition */
464 rfilter = malloc(sizeof(struct can_filter) * numfilter);
466 fprintf(stderr, "Failed to create filter space!\n");
476 ptr = nptr+1; /* hop behind the ',' */
477 nptr = strchr(ptr, ','); /* update exit condition */
479 if (sscanf(ptr, "%x:%x",
480 &rfilter[numfilter].can_id,
481 &rfilter[numfilter].can_mask) == 2) {
482 rfilter[numfilter].can_mask &= ~CAN_ERR_FLAG;
484 } else if (sscanf(ptr, "%x~%x",
485 &rfilter[numfilter].can_id,
486 &rfilter[numfilter].can_mask) == 2) {
487 rfilter[numfilter].can_id |= CAN_INV_FILTER;
488 rfilter[numfilter].can_mask &= ~CAN_ERR_FLAG;
490 } else if (*ptr == 'j' || *ptr == 'J') {
492 } else if (sscanf(ptr, "#%x", &err_mask) != 1) {
493 fprintf(stderr, "Error in filter option parsing: '%s'\n", ptr);
499 setsockopt(s[i], SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
500 &err_mask, sizeof(err_mask));
502 if (join_filter && setsockopt(s[i], SOL_CAN_RAW, CAN_RAW_JOIN_FILTERS,
503 &join_filter, sizeof(join_filter)) < 0) {
504 perror("setsockopt CAN_RAW_JOIN_FILTERS not supported by your Linux Kernel");
509 setsockopt(s[i], SOL_CAN_RAW, CAN_RAW_FILTER,
510 rfilter, numfilter * sizeof(struct can_filter));
516 /* try to switch the socket into CAN FD mode */
517 setsockopt(s[i], SOL_CAN_RAW, CAN_RAW_FD_FRAMES, &canfd_on, sizeof(canfd_on));
521 int curr_rcvbuf_size;
522 socklen_t curr_rcvbuf_size_len = sizeof(curr_rcvbuf_size);
524 /* try SO_RCVBUFFORCE first, if we run with CAP_NET_ADMIN */
525 if (setsockopt(s[i], SOL_SOCKET, SO_RCVBUFFORCE,
526 &rcvbuf_size, sizeof(rcvbuf_size)) < 0) {
528 printf("SO_RCVBUFFORCE failed so try SO_RCVBUF ...\n");
530 if (setsockopt(s[i], SOL_SOCKET, SO_RCVBUF,
531 &rcvbuf_size, sizeof(rcvbuf_size)) < 0) {
532 perror("setsockopt SO_RCVBUF");
536 if (getsockopt(s[i], SOL_SOCKET, SO_RCVBUF,
537 &curr_rcvbuf_size, &curr_rcvbuf_size_len) < 0) {
538 perror("getsockopt SO_RCVBUF");
542 /* Only print a warning the first time we detect the adjustment */
543 /* n.b.: The wanted size is doubled in Linux in net/sore/sock.c */
544 if (!i && curr_rcvbuf_size < rcvbuf_size*2)
545 fprintf(stderr, "The socket receive buffer size was "
546 "adjusted due to /proc/sys/net/core/rmem_max.\n");
550 if (timestamp || log || logfrmt) {
552 const int timestamp_on = 1;
554 if (setsockopt(s[i], SOL_SOCKET, SO_TIMESTAMP,
555 ×tamp_on, sizeof(timestamp_on)) < 0) {
556 perror("setsockopt SO_TIMESTAMP");
563 const int dropmonitor_on = 1;
565 if (setsockopt(s[i], SOL_SOCKET, SO_RXQ_OVFL,
566 &dropmonitor_on, sizeof(dropmonitor_on)) < 0) {
567 perror("setsockopt SO_RXQ_OVFL not supported by your Linux Kernel");
572 if (bind(s[i], (struct sockaddr *)&addr, sizeof(addr)) < 0) {
581 char fname[sizeof("candump-2006-11-20_202026.log")+1];
583 if (time(&currtime) == (time_t)-1) {
588 localtime_r(&currtime, &now);
590 sprintf(fname, "candump-%04d-%02d-%02d_%02d%02d%02d.log",
598 if (silent != SILENT_ON)
599 printf("\nWarning: console output active while logging!");
601 fprintf(stderr, "\nEnabling Logfile '%s'\n\n", fname);
603 logfile = fopen(fname, "w");
610 /* these settings are static and can be held out of the hot path */
611 iov.iov_base = &frame;
612 msg.msg_name = &addr;
615 msg.msg_control = &ctrlmsg;
620 for (i=0; i<currmax; i++)
624 *timeout_current = timeout_config;
626 if ((ret = select(s[currmax-1]+1, &rdfs, NULL, NULL, timeout_current)) <= 0) {
632 for (i=0; i<currmax; i++) { /* check all CAN RAW sockets */
634 if (FD_ISSET(s[i], &rdfs)) {
638 /* these settings may be modified by recvmsg() */
639 iov.iov_len = sizeof(frame);
640 msg.msg_namelen = sizeof(addr);
641 msg.msg_controllen = sizeof(ctrlmsg);
644 nbytes = recvmsg(s[i], &msg, 0);
650 if ((size_t)nbytes == CAN_MTU)
651 maxdlen = CAN_MAX_DLEN;
652 else if ((size_t)nbytes == CANFD_MTU)
653 maxdlen = CANFD_MAX_DLEN;
655 fprintf(stderr, "read: incomplete CAN frame\n");
659 if (count && (--count == 0))
664 usleep(bridge_delay);
666 nbytes = write(bridge, &frame, nbytes);
668 perror("bridge write");
670 } else if ((size_t)nbytes != CAN_MTU && (size_t)nbytes != CANFD_MTU) {
671 fprintf(stderr,"bridge write: incomplete CAN frame\n");
676 for (cmsg = CMSG_FIRSTHDR(&msg);
677 cmsg && (cmsg->cmsg_level == SOL_SOCKET);
678 cmsg = CMSG_NXTHDR(&msg,cmsg)) {
679 if (cmsg->cmsg_type == SO_TIMESTAMP)
680 tv = *(struct timeval *)CMSG_DATA(cmsg);
681 else if (cmsg->cmsg_type == SO_RXQ_OVFL)
682 dropcnt[i] = *(__u32 *)CMSG_DATA(cmsg);
685 /* check for (unlikely) dropped frames on this specific socket */
686 if (dropcnt[i] != last_dropcnt[i]) {
688 __u32 frames = dropcnt[i] - last_dropcnt[i];
690 if (silent != SILENT_ON)
691 printf("DROPCOUNT: dropped %d CAN frame%s on '%s' socket (total drops %d)\n",
692 frames, (frames > 1)?"s":"", cmdlinename[i], dropcnt[i]);
695 fprintf(logfile, "DROPCOUNT: dropped %d CAN frame%s on '%s' socket (total drops %d)\n",
696 frames, (frames > 1)?"s":"", cmdlinename[i], dropcnt[i]);
698 last_dropcnt[i] = dropcnt[i];
701 idx = idx2dindex(addr.can_ifindex, s[i]);
703 /* once we detected a EFF frame indent SFF frames accordingly */
704 if (frame.can_id & CAN_EFF_FLAG)
705 view |= CANLIB_VIEW_INDENT_SFF;
708 char buf[CL_CFSZ]; /* max length */
710 /* log CAN frame with absolute timestamp & device */
711 sprint_canframe(buf, &frame, 0, maxdlen);
712 fprintf(logfile, "(%010ld.%06ld) %*s %s\n",
713 tv.tv_sec, tv.tv_usec,
714 max_devname_len, devname[idx], buf);
718 char buf[CL_CFSZ]; /* max length */
720 /* print CAN frame in log file style to stdout */
721 sprint_canframe(buf, &frame, 0, maxdlen);
722 printf("(%010ld.%06ld) %*s %s\n",
723 tv.tv_sec, tv.tv_usec,
724 max_devname_len, devname[idx], buf);
725 goto out_fflush; /* no other output to stdout */
728 if (silent != SILENT_OFF){
729 if (silent == SILENT_ANI) {
730 printf("%c\b", anichar[silentani%=MAXANI]);
733 goto out_fflush; /* no other output to stdout */
736 printf(" %s", (color>2)?col_on[idx%MAXCOL]:"");
740 case 'a': /* absolute with timestamp */
741 printf("(%010ld.%06ld) ", tv.tv_sec, tv.tv_usec);
744 case 'A': /* absolute with date */
749 tm = *localtime(&tv.tv_sec);
750 strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", &tm);
751 printf("(%s.%06ld) ", timestring, tv.tv_usec);
755 case 'd': /* delta */
756 case 'z': /* starting with zero */
760 if (last_tv.tv_sec == 0) /* first init */
762 diff.tv_sec = tv.tv_sec - last_tv.tv_sec;
763 diff.tv_usec = tv.tv_usec - last_tv.tv_usec;
764 if (diff.tv_usec < 0)
765 diff.tv_sec--, diff.tv_usec += 1000000;
767 diff.tv_sec = diff.tv_usec = 0;
768 printf("(%03ld.%06ld) ", diff.tv_sec, diff.tv_usec);
770 if (timestamp == 'd')
771 last_tv = tv; /* update for delta calculation */
775 default: /* no timestamp output */
779 printf(" %s", (color && (color<3))?col_on[idx%MAXCOL]:"");
780 printf("%*s", max_devname_len, devname[idx]);
782 if (extra_msg_info) {
784 if (msg.msg_flags & MSG_DONTROUTE)
785 printf (" TX %s", extra_m_info[frame.flags & 3]);
787 printf (" RX %s", extra_m_info[frame.flags & 3]);
790 printf("%s ", (color==1)?col_off:"");
792 fprint_long_canframe(stdout, &frame, NULL, view, maxdlen);
794 printf("%s", (color>1)?col_off:"");
803 for (i=0; i<currmax; i++)