[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/auth.h b/ap/libc/glibc/glibc-2.22/include/rpc/auth.h
new file mode 100644
index 0000000..0219fd9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/auth.h
@@ -0,0 +1,44 @@
+#ifndef _RPC_AUTH_H
+#include <sunrpc/rpc/auth.h>
+
+libc_hidden_proto (getnetname)
+libc_hidden_proto (netname2user)
+libc_hidden_proto (host2netname)
+libc_hidden_proto (user2netname)
+libc_hidden_proto (key_gendes)
+
+/* Now define the internal interfaces.  */
+struct key_netstarg;
+extern int key_setnet (struct key_netstarg *arg);
+
+#define DECLARE_NSS_PROTOTYPES(service)					\
+extern enum nss_status _nss_ ##service ## _netname2user			\
+		       (char netname[MAXNETNAMELEN + 1], uid_t *uidp,	\
+			gid_t *gidp, int *gidlenp, gid_t *gidlist,	\
+			int *errnop);
+
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+
+#undef DECLARE_NSS_PROTOTYPES
+
+libc_hidden_proto (key_encryptsession_pk)
+libc_hidden_proto (key_decryptsession_pk)
+
+libc_hidden_proto (_null_auth)
+libc_hidden_proto (authnone_create)
+libc_hidden_proto (authunix_create)
+libc_hidden_proto (authunix_create_default)
+libc_hidden_proto (xdr_des_block)
+libc_hidden_proto (xdr_opaque_auth)
+libc_hidden_proto (authdes_create)
+libc_hidden_proto (authdes_pk_create)
+libc_hidden_proto (key_decryptsession)
+libc_hidden_proto (key_encryptsession)
+libc_hidden_proto (key_get_conv)
+libc_hidden_proto (key_secretkey_is_set)
+libc_hidden_proto (key_setnet)
+libc_hidden_proto (key_setsecret)
+libc_hidden_proto (netname2host)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/auth_des.h b/ap/libc/glibc/glibc-2.22/include/rpc/auth_des.h
new file mode 100644
index 0000000..0e9db1a
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/auth_des.h
@@ -0,0 +1,35 @@
+#ifndef _RPC_AUTH_DES_H
+
+#include <sunrpc/rpc/auth_des.h>
+
+libc_hidden_proto (getpublickey)
+libc_hidden_proto (getsecretkey)
+libc_hidden_proto (rtime)
+
+extern bool_t xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred);
+extern bool_t xdr_authdes_verf (XDR *xdrs,
+				struct authdes_verf *verf);
+struct svc_req;
+struct rpc_msg;
+extern enum auth_stat _svcauth_des (struct svc_req *rqst,
+				    struct rpc_msg *msg);
+
+
+#define DECLARE_NSS_PROTOTYPES(service)					\
+extern enum nss_status _nss_ ## service ## _getpublickey		\
+		       (const char *netname, char *pkey, int *errnop);	\
+extern enum nss_status _nss_ ## service ## _getsecretkey		\
+		       (const char *netname, char *skey, char *passwd,	\
+			int *errnop);
+
+DECLARE_NSS_PROTOTYPES (files)
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+
+#undef DECLARE_NSS_PROTOTYPES
+
+libc_hidden_proto (authdes_getucred)
+libc_hidden_proto (xdr_authdes_cred)
+libc_hidden_proto (xdr_authdes_verf)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/auth_unix.h b/ap/libc/glibc/glibc-2.22/include/rpc/auth_unix.h
new file mode 100644
index 0000000..07031c9
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/auth_unix.h
@@ -0,0 +1,3 @@
+#include <sunrpc/rpc/auth_unix.h>
+
+libc_hidden_proto (xdr_authunix_parms)
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/clnt.h b/ap/libc/glibc/glibc-2.22/include/rpc/clnt.h
new file mode 100644
index 0000000..d79a6a7
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/clnt.h
@@ -0,0 +1,30 @@
+#ifndef _RPC_CLNT_H
+#include <sunrpc/rpc/clnt.h>
+
+/* Now define the internal interfaces.  */
+extern int _openchild (const char *command, FILE **fto, FILE **ffrom);
+
+extern CLIENT *__libc_clntudp_bufcreate (struct sockaddr_in *__raddr,
+					 u_long __program, u_long __version,
+					 struct timeval __wait_resend,
+					 int *__sockp, u_int __sendsz,
+					 u_int __recvsz, int __flags);
+
+libc_hidden_proto (clnt_sperrno)
+libc_hidden_proto (clnt_spcreateerror)
+libc_hidden_proto (clnt_perror)
+libc_hidden_proto (clnt_sperror)
+libc_hidden_proto (_rpc_dtablesize)
+libc_hidden_proto (callrpc)
+libc_hidden_proto (clnt_create)
+libc_hidden_proto (clnt_pcreateerror)
+libc_hidden_proto (clnt_perrno)
+libc_hidden_proto (clntraw_create)
+libc_hidden_proto (clnttcp_create)
+libc_hidden_proto (clntudp_bufcreate)
+libc_hidden_proto (clntudp_create)
+libc_hidden_proto (get_myaddress)
+libc_hidden_proto (clntunix_create)
+libc_hidden_proto (__libc_clntudp_bufcreate)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/des_crypt.h b/ap/libc/glibc/glibc-2.22/include/rpc/des_crypt.h
new file mode 100644
index 0000000..44f7e66
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/des_crypt.h
@@ -0,0 +1,15 @@
+#ifndef __DES_CRYPT_H__
+#include <sunrpc/rpc/des_crypt.h>
+
+/* Now define the internal interfaces.  */
+
+extern int xencrypt (char *secret, char *passwd);
+extern int xdecrypt (char *secret, char *passwd);
+
+libc_hidden_proto (des_setparity)
+libc_hidden_proto (ecb_crypt)
+libc_hidden_proto (cbc_crypt)
+libc_hidden_proto (xencrypt)
+libc_hidden_proto (xdecrypt)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/key_prot.h b/ap/libc/glibc/glibc-2.22/include/rpc/key_prot.h
new file mode 100644
index 0000000..29d14cc
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/key_prot.h
@@ -0,0 +1,12 @@
+#include <sunrpc/rpc/key_prot.h>
+
+libc_hidden_proto (xdr_cryptkeyarg)
+libc_hidden_proto (xdr_cryptkeyarg2)
+libc_hidden_proto (xdr_cryptkeyres)
+libc_hidden_proto (xdr_key_netstarg)
+libc_hidden_proto (xdr_key_netstres)
+libc_hidden_proto (xdr_keybuf)
+libc_hidden_proto (xdr_keystatus)
+libc_hidden_proto (xdr_getcredres)
+libc_hidden_proto (xdr_netnamestr)
+libc_hidden_proto (xdr_unixcred)
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/netdb.h b/ap/libc/glibc/glibc-2.22/include/rpc/netdb.h
new file mode 100644
index 0000000..65af237
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/netdb.h
@@ -0,0 +1,51 @@
+#ifndef _RPC_NETDB_H
+#include <sunrpc/rpc/netdb.h>
+
+extern int __getrpcbyname_r (const char *__name, struct rpcent *__result_buf,
+			     char *__buffer, size_t __buflen,
+			     struct rpcent **__result);
+extern int __old_getrpcbyname_r (const char *__name,
+				 struct rpcent *__result_buf,
+				 char *__buffer, size_t __buflen,
+				 struct rpcent **__result);
+
+extern int __getrpcbynumber_r (int __number, struct rpcent *__result_buf,
+			       char *__buffer, size_t __buflen,
+			       struct rpcent **__result);
+extern int __old_getrpcbynumber_r (int __number, struct rpcent *__result_buf,
+				   char *__buffer, size_t __buflen,
+				   struct rpcent **__result);
+
+extern int __getrpcent_r (struct rpcent *__result_buf, char *__buffer,
+			  size_t __buflen, struct rpcent **__result)
+     attribute_hidden;
+extern int __old_getrpcent_r (struct rpcent *__result_buf, char *__buffer,
+			      size_t __buflen, struct rpcent **__result);
+
+struct parser_data;
+extern int _nss_files_parse_rpcent (char *line, struct rpcent *result,
+				    struct parser_data *data,
+				    size_t datalen, int *errnop);
+libnss_files_hidden_proto (_nss_files_parse_rpcent)
+
+#define DECLARE_NSS_PROTOTYPES(service)					      \
+extern enum nss_status _nss_ ## service ## _setrpcent (int);		      \
+extern enum nss_status _nss_ ## service ## _endrpcent (void);		      \
+extern enum nss_status _nss_ ## service ## _getrpcent_r			      \
+		       (struct rpcent *rpc, char *buffer, size_t buflen,      \
+			int *errnop);					      \
+extern enum nss_status _nss_ ## service ## _getrpcbyname_r		      \
+		       (const char *name, struct rpcent *rpc,		      \
+			char *buffer, size_t buflen, int *errnop);	      \
+extern enum nss_status _nss_ ## service ## _getrpcbynumber_r		      \
+		       (int number, struct rpcent *rpc,			      \
+			char *buffer, size_t buflen, int *errnop);
+
+
+DECLARE_NSS_PROTOTYPES (files)
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+
+#undef DECLARE_NSS_PROTOTYPES
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/pmap_clnt.h b/ap/libc/glibc/glibc-2.22/include/rpc/pmap_clnt.h
new file mode 100644
index 0000000..67628e0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/pmap_clnt.h
@@ -0,0 +1,21 @@
+#ifndef _RPC_PMAP_CLNT_H
+# include <sunrpc/rpc/pmap_clnt.h>
+
+libc_hidden_proto (pmap_getport)
+libc_hidden_proto (pmap_set)
+libc_hidden_proto (pmap_unset)
+
+/* Defined in pm_getport.c.  */
+extern int __get_socket (struct sockaddr_in *saddr)
+     attribute_hidden internal_function;
+extern u_short __libc_rpc_getport (struct sockaddr_in *address, u_long program,
+				   u_long version, u_int protocol,
+				   time_t timeout_sec, time_t tottimeout_sec)
+     internal_function;
+libc_hidden_proto (__libc_rpc_getport)
+
+libc_hidden_proto (clnt_broadcast)
+libc_hidden_proto (pmap_getmaps)
+libc_hidden_proto (pmap_rmtcall)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/pmap_prot.h b/ap/libc/glibc/glibc-2.22/include/rpc/pmap_prot.h
new file mode 100644
index 0000000..2e9076e
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/pmap_prot.h
@@ -0,0 +1,4 @@
+#include <sunrpc/rpc/pmap_prot.h>
+
+libc_hidden_proto (xdr_pmap)
+libc_hidden_proto (xdr_pmaplist)
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/pmap_rmt.h b/ap/libc/glibc/glibc-2.22/include/rpc/pmap_rmt.h
new file mode 100644
index 0000000..e8822da
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/pmap_rmt.h
@@ -0,0 +1,4 @@
+#include <sunrpc/rpc/pmap_rmt.h>
+
+libc_hidden_proto (xdr_rmtcall_args)
+libc_hidden_proto (xdr_rmtcallres)
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/rpc.h b/ap/libc/glibc/glibc-2.22/include/rpc/rpc.h
new file mode 100644
index 0000000..d2f3013
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/rpc.h
@@ -0,0 +1,59 @@
+#ifndef _RPC_RPC_H
+#include <sunrpc/rpc/rpc.h>
+#include <bits/libc-tsd.h>
+
+/* Now define the internal interfaces.  */
+extern unsigned long _create_xid (void);
+
+/*
+ * Multi-threaded support
+ * Group all global and static variables into a single spot.
+ * This area is allocated on a per-thread basis
+ */
+#ifdef _RPC_THREAD_SAFE_
+struct rpc_thread_variables {
+	fd_set		svc_fdset_s;		/* Global, rpc_common.c */
+	struct rpc_createerr rpc_createerr_s;	/* Global, rpc_common.c */
+	struct pollfd	*svc_pollfd_s;		/* Global, rpc_common.c */
+	int		svc_max_pollfd_s;	/* Global, rpc_common.c */
+
+	char		*clnt_perr_buf_s;	/* clnt_perr.c */
+
+	struct clntraw_private_s *clntraw_private_s;	/* clnt_raw.c */
+
+	struct callrpc_private_s *callrpc_private_s;	/* clnt_simp.c */
+
+	struct key_call_private *key_call_private_s;	/* key_call.c */
+
+	struct cache_entry *authdes_cache_s;	/* svcauth_des.c */
+	int		*authdes_lru_s;		/* svcauth_des.c */
+
+	SVCXPRT		**svc_xports_s;		/* svc.c */
+	struct svc_callout *svc_head_s;		/* svc.c */
+
+	struct svcraw_private_s *svcraw_private_s;	/* svc_raw.c */
+
+	struct proglst_ *svcsimple_proglst_s;	/* svc_simple.c */
+	SVCXPRT		*svcsimple_transp_s;	/* svc_simple.c */
+};
+
+extern struct rpc_thread_variables *__rpc_thread_variables(void)
+     __attribute__ ((const));
+extern void __rpc_thread_svc_cleanup (void);
+extern void __rpc_thread_clnt_cleanup (void);
+extern void __rpc_thread_key_cleanup (void);
+
+extern void __rpc_thread_destroy (void);
+
+__libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS)
+
+#define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x)
+
+libc_hidden_proto (__rpc_thread_svc_max_pollfd)
+libc_hidden_proto (__rpc_thread_svc_pollfd)
+libc_hidden_proto (__rpc_thread_svc_fdset)
+libc_hidden_proto (__rpc_thread_createerr)
+
+#endif /* _RPC_THREAD_SAFE_ */
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/rpc_msg.h b/ap/libc/glibc/glibc-2.22/include/rpc/rpc_msg.h
new file mode 100644
index 0000000..be1f483
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/rpc_msg.h
@@ -0,0 +1,17 @@
+#ifndef _RPC_MSG_H
+#include <sunrpc/rpc/rpc_msg.h>
+
+libc_hidden_proto (_seterr_reply)
+
+/* Now define the internal interfaces.  */
+
+extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
+extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
+
+libc_hidden_proto (xdr_accepted_reply)
+libc_hidden_proto (xdr_callhdr)
+libc_hidden_proto (xdr_callmsg)
+libc_hidden_proto (xdr_rejected_reply)
+libc_hidden_proto (xdr_replymsg)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/svc.h b/ap/libc/glibc/glibc-2.22/include/rpc/svc.h
new file mode 100644
index 0000000..61a8ab3
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/svc.h
@@ -0,0 +1,40 @@
+#ifndef _RPC_SVC_H
+#include <sunrpc/rpc/svc.h>
+
+libc_hidden_proto (xprt_register)
+libc_hidden_proto (xprt_unregister)
+libc_hidden_proto (svc_register)
+libc_hidden_proto (svc_unregister)
+libc_hidden_proto (svcerr_auth)
+libc_hidden_proto (svcerr_noprog)
+libc_hidden_proto (svcerr_progvers)
+
+/* Now define the internal interfaces.  */
+extern SVCXPRT *svcfd_create (int fd, u_int sendsize, u_int recvsize);
+
+extern int svcudp_enablecache (SVCXPRT *transp, u_long size);
+extern SVCXPRT *svcunixfd_create (int fd, u_int sendsize, u_int recvsize);
+
+libc_hidden_proto (svc_exit)
+libc_hidden_proto (svc_getreq)
+libc_hidden_proto (svc_getreqset)
+libc_hidden_proto (svc_run)
+libc_hidden_proto (svc_sendreply)
+libc_hidden_proto (svcerr_decode)
+libc_hidden_proto (svcerr_noproc)
+libc_hidden_proto (svcerr_systemerr)
+libc_hidden_proto (svcerr_weakauth)
+libc_hidden_proto (svcfd_create)
+libc_hidden_proto (svcraw_create)
+libc_hidden_proto (svctcp_create)
+libc_hidden_proto (svcudp_bufcreate)
+libc_hidden_proto (svcudp_create)
+libc_hidden_proto (svcudp_enablecache)
+libc_hidden_proto (svcunix_create)
+libc_hidden_proto (svcunixfd_create)
+libc_hidden_proto (svc_getreq_common)
+libc_hidden_proto (svc_getreq_poll)
+
+extern void __svc_accept_failed (void) attribute_hidden;
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/svc_auth.h b/ap/libc/glibc/glibc-2.22/include/rpc/svc_auth.h
new file mode 100644
index 0000000..582bb31
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/svc_auth.h
@@ -0,0 +1,12 @@
+#ifndef _RPC_SVC_AUTH_H
+#include <sunrpc/rpc/svc_auth.h>
+
+/* Now define the internal interfaces.  */
+extern enum auth_stat _svcauth_unix (struct svc_req *rqst,
+				     struct rpc_msg *msg);
+extern enum auth_stat _svcauth_short (struct svc_req *rqst,
+				      struct rpc_msg *msg);
+
+libc_hidden_proto (_authenticate)
+
+#endif
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/types.h b/ap/libc/glibc/glibc-2.22/include/rpc/types.h
new file mode 100644
index 0000000..53df7e6
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/types.h
@@ -0,0 +1 @@
+#include <sunrpc/rpc/types.h>
diff --git a/ap/libc/glibc/glibc-2.22/include/rpc/xdr.h b/ap/libc/glibc/glibc-2.22/include/rpc/xdr.h
new file mode 100644
index 0000000..57971d0
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/include/rpc/xdr.h
@@ -0,0 +1,47 @@
+#include <sunrpc/rpc/xdr.h>
+
+libc_hidden_proto (xdrstdio_create)
+libc_hidden_proto (xdr_array)
+libc_hidden_proto (xdr_bool)
+libc_hidden_proto (xdr_bytes)
+libc_hidden_proto (xdr_char)
+libc_hidden_proto (xdr_double)
+libc_hidden_proto (xdr_enum)
+libc_hidden_proto (xdr_float)
+libc_hidden_proto (xdr_free)
+libc_hidden_proto (xdr_int)
+libc_hidden_proto (xdr_long)
+libc_hidden_proto (xdr_netobj)
+libc_hidden_proto (xdr_opaque)
+libc_hidden_proto (xdr_pointer)
+libc_hidden_proto (xdr_reference)
+libc_hidden_proto (xdr_short)
+libc_hidden_proto (xdr_string)
+libc_hidden_proto (xdr_u_char)
+libc_hidden_proto (xdr_u_int)
+libc_hidden_proto (xdr_u_long)
+libc_hidden_proto (xdr_u_short)
+libc_hidden_proto (xdr_union)
+libc_hidden_proto (xdr_vector)
+libc_hidden_proto (xdr_void)
+libc_hidden_proto (xdr_wrapstring)
+libc_hidden_proto (xdrmem_create)
+libc_hidden_proto (xdrrec_create)
+libc_hidden_proto (xdrrec_endofrecord)
+libc_hidden_proto (xdrrec_eof)
+libc_hidden_proto (xdrrec_skiprecord)
+libc_hidden_proto (xdr_int16_t)
+libc_hidden_proto (xdr_int32_t)
+libc_hidden_proto (xdr_int8_t)
+libc_hidden_proto (xdr_sizeof)
+libc_hidden_proto (xdr_uint16_t)
+libc_hidden_proto (xdr_uint32_t)
+libc_hidden_proto (xdr_uint8_t)
+libc_hidden_proto (xdr_hyper)
+libc_hidden_proto (xdr_u_hyper)
+libc_hidden_proto (xdr_longlong_t)
+libc_hidden_proto (xdr_u_longlong_t)
+libc_hidden_proto (xdr_int64_t)
+libc_hidden_proto (xdr_uint64_t)
+libc_hidden_proto (xdr_quad_t)
+libc_hidden_proto (xdr_u_quad_t)