Update to version 1.3.4 of ncplib. Cleanup header files.

This commit is contained in:
bp 1999-12-12 05:50:07 +00:00
parent 5dc2695cfc
commit 8fc09c011c
9 changed files with 42 additions and 35 deletions

View File

@ -7,11 +7,11 @@
* $FreeBSD$
*/
#ifndef _NCP_H_
#define _NCP_H_
#ifndef _NETNCP_NCP_H_
#define _NETNCP_NCP_H_
#define NCP_VERMAJ 1
#define NCP_VERMIN 3300
#define NCP_VERMIN 3400
#define NCP_VERSION (NCP_VERMAJ*100000 + NCP_VERMIN)
typedef u_int32_t nwdirent;

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_CONN_H_
#define _NCP_CONN_H_
#ifndef _NETNCP_NCP_CONN_H_
#define _NETNCP_NCP_CONN_H_
#ifdef INET
#ifndef _NETINET_IN_H_

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_NCP_H_
#define _NCP_NCP_H_
#ifndef _NETNCP_NCP_NCP_H_
#define _NETNCP_NCP_NCP_H_
#define NCP_ALLOC_SLOT 0x1111
#define NCP_REQUEST 0x2222

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_NCP_NLS_H_
#define _NCP_NCP_NLS_H_
#ifndef _NETNCP_NCP_NLS_H_
#define _NETNCP_NCP_NLS_H_
/* options for handle path & caseopt in mount struct */
#define NWHP_HDB 0x01 /* have dir base */
@ -62,6 +62,8 @@ struct ncp_nlstables {
extern struct ncp_nlstables ncp_nls; /* active nls */
__BEGIN_DECLS
int ncp_nls_setrecode(int scheme);
int ncp_nls_setrecodebyname(char *name);
int ncp_nls_setlocale(char *name);
@ -70,6 +72,8 @@ char* ncp_nls_str_u2n(char *dst, const char *src);
char* ncp_nls_mem_n2u(char *dst, const char *src, int size);
char* ncp_nls_mem_u2n(char *dst, const char *src, int size);
__END_DECLS
#else /* !KERNEL */

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_NCP_RQ_H_
#define _NCP_NCP_RQ_H_
#ifndef _NETNCP_NCP_RQ_H_
#define _NETNCP_NCP_RQ_H_
#include <machine/endian.h>
@ -160,25 +160,26 @@ void ncp_sign_init(const char *logindata, char *sign_root);
#define ncp_add_byte(conn,x) (conn)->packet[(conn)->rqsize++]=x
void ncp_init_request(struct ncp_buf *conn);
void ncp_init_request_s(struct ncp_buf *conn, int subfn);
void ncp_add_word_lh(struct ncp_buf *conn, u_int16_t x);
void ncp_add_dword_lh(struct ncp_buf *conn, u_int32_t x);
void ncp_add_word_hl(struct ncp_buf *conn, u_int16_t x);
void ncp_add_dword_hl(struct ncp_buf *conn, u_int32_t x);
void ncp_add_mem(struct ncp_buf *conn, const void *source, int size);
void ncp_add_mem_nls(struct ncp_buf *conn, const void *source, int size);
void ncp_add_pstring(struct ncp_buf *conn, const char *s);
void ncp_add_handle_path(struct ncp_buf *conn, nuint32 volNumber, nuint32 dirNumber,
int handleFlag, const char *path);
__BEGIN_DECLS
void ncp_init_request(struct ncp_buf *);
void ncp_init_request_s(struct ncp_buf *, int);
void ncp_add_word_lh(struct ncp_buf *, u_int16_t);
void ncp_add_dword_lh(struct ncp_buf *, u_int32_t);
void ncp_add_word_hl(struct ncp_buf *, u_int16_t);
void ncp_add_dword_hl(struct ncp_buf *, u_int32_t);
void ncp_add_mem(struct ncp_buf *, const void *, int);
void ncp_add_mem_nls(struct ncp_buf *, const void *, int);
void ncp_add_pstring(struct ncp_buf *, const char *);
void ncp_add_handle_path(struct ncp_buf *, nuint32, nuint32, int, const char *);
#define ncp_reply_data(conn,offset) ((conn)->packet+offset)
#define ncp_reply_byte(conn,offset) (*(u_int8_t*)(ncp_reply_data(conn, offset)))
u_int16_t ncp_reply_word_hl(struct ncp_buf *conn, int offset);
u_int16_t ncp_reply_word_lh(struct ncp_buf *conn, int offset);
u_int32_t ncp_reply_dword_hl(struct ncp_buf *conn, int offset);
u_int32_t ncp_reply_dword_lh(struct ncp_buf *conn, int offset);
u_int16_t ncp_reply_word_hl(struct ncp_buf *, int);
u_int16_t ncp_reply_word_lh(struct ncp_buf *, int);
u_int32_t ncp_reply_dword_hl(struct ncp_buf *, int);
u_int32_t ncp_reply_dword_lh(struct ncp_buf *, int);
static __inline void
ConvertToNWfromDWORD(u_int32_t sfd, ncp_fh *fh) {
@ -186,6 +187,8 @@ ConvertToNWfromDWORD(u_int32_t sfd, ncp_fh *fh) {
return;
}
__END_DECLS
#endif /* ifdef KERNEL */
#endif /* _NCP_NCP_RQ_H_ */
#endif /* !_NETNCP_NCP_RQ_H_ */

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_SOCK_H_
#define _NCP_SOCK_H_
#ifndef _NETNCP_NCP_SOCK_H_
#define _NETNCP_NCP_SOCK_H_
int ncp_sock_connect_ipx(struct ncp_conn *);
int ncp_sock_connect_in(struct ncp_conn *);

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_SUBR_H_
#define _NCP_SUBR_H_
#ifndef _NETNCP_NCP_SUBR_H_
#define _NETNCP_NCP_SUBR_H_
#define NCP_TIMER_TICK 2*hz /* 1sec */
#define NCP_SIGMASK(set) \

View File

@ -31,8 +31,8 @@
*
* $FreeBSD$
*/
#ifndef _NCP_USER_H_
#define _NCP_USER_H_
#ifndef _NETNCP_NCP_USER_H_
#define _NETNCP_NCP_USER_H_
/*
* "ncp" interface to kernel, this can be done via syscalls but may eat

View File

@ -3,8 +3,8 @@
*
* $FreeBSD$
*/
#if !defined (_NWERROR_H_)
#define _NWERROR_H_
#ifndef _NETNCP_NWERROR_H_
#define _NETNCP_NWERROR_H_
#ifndef SUCCESS
#define SUCCESS 0