mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-27 05:46:36 +08:00
95def09838
- OpenBSD CVS updates - [channels.c cipher.c compat.c log-client.c scp.c serverloop.c] [ssh.h sshd.8 sshd.c] syslog changes: * Unified Logmessage for all auth-types, for success and for failed * Standard connections get only ONE line in the LOG when level==LOG: Auth-attempts are logged only, if authentication is: a) successfull or b) with passwd or c) we had more than AUTH_FAIL_LOG failues * many log() became verbose() * old behaviour with level=VERBOSE - [readconf.c readconf.h ssh.1 ssh.h sshconnect.c sshd.c] tranfer s/key challenge/response data in SSH_SMSG_AUTH_TIS_CHALLENGE messages. allows use of s/key in windows (ttssh, securecrt) and ssh-1.2.27 clients without 'ssh -v', ok: niels@ - [sshd.8] -V, for fallback to openssh in SSH2 compatibility mode - [sshd.c] fix sigchld race; cjc5@po.cwru.edu
64 lines
1.8 KiB
C
64 lines
1.8 KiB
C
/*
|
|
*
|
|
* getput.h
|
|
*
|
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
|
*
|
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
|
* All rights reserved
|
|
*
|
|
* Created: Wed Jun 28 22:36:30 1995 ylo
|
|
*
|
|
* Macros for storing and retrieving data in msb first and lsb first order.
|
|
*
|
|
*/
|
|
|
|
/* RCSID("$Id: getput.h,v 1.2 1999/11/24 13:26:22 damien Exp $"); */
|
|
|
|
#ifndef GETPUT_H
|
|
#define GETPUT_H
|
|
|
|
/*------------ macros for storing/extracting msb first words -------------*/
|
|
|
|
#define GET_32BIT(cp) (((unsigned long)(unsigned char)(cp)[0] << 24) | \
|
|
((unsigned long)(unsigned char)(cp)[1] << 16) | \
|
|
((unsigned long)(unsigned char)(cp)[2] << 8) | \
|
|
((unsigned long)(unsigned char)(cp)[3]))
|
|
|
|
#define GET_16BIT(cp) (((unsigned long)(unsigned char)(cp)[0] << 8) | \
|
|
((unsigned long)(unsigned char)(cp)[1]))
|
|
|
|
#define PUT_32BIT(cp, value) do { \
|
|
(cp)[0] = (value) >> 24; \
|
|
(cp)[1] = (value) >> 16; \
|
|
(cp)[2] = (value) >> 8; \
|
|
(cp)[3] = (value); } while (0)
|
|
|
|
#define PUT_16BIT(cp, value) do { \
|
|
(cp)[0] = (value) >> 8; \
|
|
(cp)[1] = (value); } while (0)
|
|
|
|
/*------------ macros for storing/extracting lsb first words -------------*/
|
|
|
|
#define GET_32BIT_LSB_FIRST(cp) \
|
|
(((unsigned long)(unsigned char)(cp)[0]) | \
|
|
((unsigned long)(unsigned char)(cp)[1] << 8) | \
|
|
((unsigned long)(unsigned char)(cp)[2] << 16) | \
|
|
((unsigned long)(unsigned char)(cp)[3] << 24))
|
|
|
|
#define GET_16BIT_LSB_FIRST(cp) \
|
|
(((unsigned long)(unsigned char)(cp)[0]) | \
|
|
((unsigned long)(unsigned char)(cp)[1] << 8))
|
|
|
|
#define PUT_32BIT_LSB_FIRST(cp, value) do { \
|
|
(cp)[0] = (value); \
|
|
(cp)[1] = (value) >> 8; \
|
|
(cp)[2] = (value) >> 16; \
|
|
(cp)[3] = (value) >> 24; } while (0)
|
|
|
|
#define PUT_16BIT_LSB_FIRST(cp, value) do { \
|
|
(cp)[0] = (value); \
|
|
(cp)[1] = (value) >> 8; } while (0)
|
|
|
|
#endif /* GETPUT_H */
|