]> rtime.felk.cvut.cz Git - can-utils.git/blobdiff - slcan_attach.c
use line discipline number from linux/tty.h
[can-utils.git] / slcan_attach.c
index 89366be014ee38a397d171a1fc84f6d89ad40a02..ab8ff0ac30f1c87ad76c3df0e66533386668391c 100644 (file)
@@ -1,7 +1,3 @@
-/*
- *  $Id$
- */
-
 /*
  * slcan_attach.c - userspace tool for serial line CAN interface driver SLCAN
  *
@@ -41,7 +37,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  * DAMAGE.
  *
- * Send feedback to <socketcan-users@lists.berlios.de>
+ * Send feedback to <linux-can@vger.kernel.org>
  *
  */
 
 #include <fcntl.h>
 #include <unistd.h>
 #include <getopt.h>
+#include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <net/if.h>
-
-#define LDISC_N_SLCAN 17 /* default slcan line discipline since Kernel 2.6.25 */
+#include <termios.h>
+#include <linux/tty.h>
 
 void print_usage(char *prg)
 {
@@ -79,7 +76,7 @@ void print_usage(char *prg)
 int main(int argc, char **argv)
 {
        int fd;
-       int ldisc = LDISC_N_SLCAN;
+       int ldisc = N_SLCAN;
        int detach = 0;
        int waitkey = 0;
        int send_open = 0;