mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove a bunch more no-longer-used stuff in libpq-be.h.
This commit is contained in:
@ -37,7 +37,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.260 2001/11/11 02:09:05 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.261 2001/11/12 05:43:24 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -1305,7 +1305,6 @@ ConnCreate(int serverFd)
|
|||||||
* using the same salt...
|
* using the same salt...
|
||||||
*/
|
*/
|
||||||
RandomSalt(port->cryptSalt, port->md5Salt);
|
RandomSalt(port->cryptSalt, port->md5Salt);
|
||||||
port->pktInfo.state = Idle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return port;
|
return port;
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
/*-------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* libpq_be.h
|
* libpq_be.h
|
||||||
* This file contains definitions for structures and
|
* This file contains definitions for structures and externs used
|
||||||
* externs for functions used by the POSTGRES backend.
|
* by the postmaster during client authentication.
|
||||||
|
*
|
||||||
|
* Note that this is backend-internal and is NOT exported to clients.
|
||||||
|
* Structs that need to be client-visible are in pqcomm.h.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: libpq-be.h,v 1.26 2001/11/12 04:19:15 tgl Exp $
|
* $Id: libpq-be.h,v 1.27 2001/11/12 05:43:25 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -35,78 +38,6 @@ typedef struct PasswordPacketV0
|
|||||||
} PasswordPacketV0;
|
} PasswordPacketV0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Password packet. The length of the password can be changed without
|
|
||||||
* affecting anything.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct PasswordPacket
|
|
||||||
{
|
|
||||||
char passwd[100]; /* The password. */
|
|
||||||
} PasswordPacket;
|
|
||||||
|
|
||||||
|
|
||||||
/* Error message packet. */
|
|
||||||
|
|
||||||
typedef struct ErrorMessagePacket
|
|
||||||
{
|
|
||||||
char data[1 + 100]; /* 'E' + the message. */
|
|
||||||
} ErrorMessagePacket;
|
|
||||||
|
|
||||||
|
|
||||||
/* Authentication request packet. */
|
|
||||||
|
|
||||||
typedef struct AuthRequestPacket
|
|
||||||
{
|
|
||||||
char data[1 + sizeof(AuthRequest) + 4]; /* 'R' + the request +
|
|
||||||
* optional salt. */
|
|
||||||
} AuthRequestPacket;
|
|
||||||
|
|
||||||
|
|
||||||
/* These are used by the packet handling routines. */
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
Idle,
|
|
||||||
ReadingPacketLength,
|
|
||||||
ReadingPacket,
|
|
||||||
WritingPacket
|
|
||||||
} PacketState;
|
|
||||||
|
|
||||||
typedef int (*PacketDoneProc) (void *arg, PacketLen pktlen, void *pktdata);
|
|
||||||
|
|
||||||
typedef struct Packet
|
|
||||||
{
|
|
||||||
PacketState state; /* What's in progress. */
|
|
||||||
PacketLen len; /* Actual length */
|
|
||||||
int nrtodo; /* Bytes still to transfer */
|
|
||||||
char *ptr; /* Buffer pointer */
|
|
||||||
PacketDoneProc iodone; /* I/O complete callback */
|
|
||||||
void *arg; /* Argument to callback */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* We declare the data buffer as a union of the allowed packet types,
|
|
||||||
* mainly to ensure that enough space is allocated for the largest
|
|
||||||
* one.
|
|
||||||
*/
|
|
||||||
|
|
||||||
union
|
|
||||||
{
|
|
||||||
/* These are outgoing so have no packet length prepended. */
|
|
||||||
|
|
||||||
ErrorMessagePacket em;
|
|
||||||
AuthRequestPacket ar;
|
|
||||||
|
|
||||||
/* These are incoming and have a packet length prepended. */
|
|
||||||
|
|
||||||
StartupPacket si;
|
|
||||||
CancelRequestPacket canc;
|
|
||||||
PasswordPacketV0 pwv0;
|
|
||||||
PasswordPacket pw;
|
|
||||||
} pkt;
|
|
||||||
} Packet;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is used by the postmaster in its communication with frontends. It is
|
* This is used by the postmaster in its communication with frontends. It is
|
||||||
* contains all state information needed during this communication before the
|
* contains all state information needed during this communication before the
|
||||||
@ -116,9 +47,8 @@ typedef struct Packet
|
|||||||
typedef struct Port
|
typedef struct Port
|
||||||
{
|
{
|
||||||
int sock; /* File descriptor */
|
int sock; /* File descriptor */
|
||||||
Packet pktInfo; /* For the packet handlers */
|
SockAddr laddr; /* local addr (postmaster) */
|
||||||
SockAddr laddr; /* local addr (us) */
|
SockAddr raddr; /* remote addr (client) */
|
||||||
SockAddr raddr; /* remote addr (them) */
|
|
||||||
char md5Salt[4]; /* Password salt */
|
char md5Salt[4]; /* Password salt */
|
||||||
char cryptSalt[2]; /* Password salt */
|
char cryptSalt[2]; /* Password salt */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user