summaryrefslogtreecommitdiffstats
path: root/sys/netncp
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netncp')
-rw-r--r--sys/netncp/ncp.h6
-rw-r--r--sys/netncp/ncp_conn.h4
-rw-r--r--sys/netncp/ncp_ncp.h4
-rw-r--r--sys/netncp/ncp_nls.h8
-rw-r--r--sys/netncp/ncp_rq.h39
-rw-r--r--sys/netncp/ncp_sock.h4
-rw-r--r--sys/netncp/ncp_subr.h4
-rw-r--r--sys/netncp/ncp_user.h4
-rw-r--r--sys/netncp/nwerror.h4
9 files changed, 42 insertions, 35 deletions
diff --git a/sys/netncp/ncp.h b/sys/netncp/ncp.h
index 044f3c6..7add064 100644
--- a/sys/netncp/ncp.h
+++ b/sys/netncp/ncp.h
@@ -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;
diff --git a/sys/netncp/ncp_conn.h b/sys/netncp/ncp_conn.h
index 8e7df8f..923293c 100644
--- a/sys/netncp/ncp_conn.h
+++ b/sys/netncp/ncp_conn.h
@@ -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_
diff --git a/sys/netncp/ncp_ncp.h b/sys/netncp/ncp_ncp.h
index 1d5b479..e430641 100644
--- a/sys/netncp/ncp_ncp.h
+++ b/sys/netncp/ncp_ncp.h
@@ -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
diff --git a/sys/netncp/ncp_nls.h b/sys/netncp/ncp_nls.h
index e5e06b3..489b6df 100644
--- a/sys/netncp/ncp_nls.h
+++ b/sys/netncp/ncp_nls.h
@@ -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 */
diff --git a/sys/netncp/ncp_rq.h b/sys/netncp/ncp_rq.h
index 259fed2..7cc58fe 100644
--- a/sys/netncp/ncp_rq.h
+++ b/sys/netncp/ncp_rq.h
@@ -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_ */
diff --git a/sys/netncp/ncp_sock.h b/sys/netncp/ncp_sock.h
index 37aa712..1f88e65 100644
--- a/sys/netncp/ncp_sock.h
+++ b/sys/netncp/ncp_sock.h
@@ -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 *);
diff --git a/sys/netncp/ncp_subr.h b/sys/netncp/ncp_subr.h
index af3c784..1d99763 100644
--- a/sys/netncp/ncp_subr.h
+++ b/sys/netncp/ncp_subr.h
@@ -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) \
diff --git a/sys/netncp/ncp_user.h b/sys/netncp/ncp_user.h
index 4f430b0..62ba777 100644
--- a/sys/netncp/ncp_user.h
+++ b/sys/netncp/ncp_user.h
@@ -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
diff --git a/sys/netncp/nwerror.h b/sys/netncp/nwerror.h
index 6a5b09e..8dc7a93 100644
--- a/sys/netncp/nwerror.h
+++ b/sys/netncp/nwerror.h
@@ -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
OpenPOWER on IntegriCloud