lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 09 Nov 2010 10:56:48 -0600
From:	Milton Miller <miltonm@....com>
To:	Ramya Desai <ramya.desai@...il.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: (No subject header)


On Tue Nov 09 2010 around 02:27:38 EST, Ramya Desai wrote:
> I did not understand the CRTSCTS preprocessor macro which is defined
> in termbits.h file.
..
> As per the typedefs defined in the beginning of the file, the c_cflag
> is unsigned int member in the struct termios structure. The CRTSCTS is
> defined in the file as a 48 bit value.
> 
> #define CRTSCTS 020000000000 /* flow control */

That is not a 48 bit value.

> 
> I saw the following snippet in one of the serial applications.
> 
> struct termios newtio;
> newtio.c_cflag = B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
> 
> My question is, the c_cflag is a 32 bit value member and the CRTSCTS
> is a 48 bit value. How CRTSCTS is accommodates into c_cflag variable?
> Please let me know, if my interpretation is wrong.
> 
> Thanks in advance.

Hint: constants in C may be expressed in base 16, 10, or 8.

milton
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ