-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathwinpgntc.h
30 lines (23 loc) · 829 Bytes
/
winpgntc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* Pageant client header.
* Copyright (C) 2009,2014 Josh Stone
*
* This file is part of ssh-pageant, and is free software: you can
* redistribute it and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*/
#ifndef __WINPGNTC_H__
#define __WINPGNTC_H__
#include <arpa/inet.h>
#define AGENT_MAX_MSGLEN 8192
#if defined(__MSYS__) && !defined(__NEWLIB__)
// MSYS doesn't have stdint.h or uint32_t,
// but its ntohl wants unsigned long anyway.
typedef unsigned long uint32_t;
#endif // defined(__MSYS__) && !defined(__NEWLIB__)
extern void agent_query(void *buf);
static inline int msglen(const void *p) {
return 4 + ntohl(*(const uint32_t *)p);
}
#endif /* __WINPGNTC_H__ */