rx: Remove unneeded rxi_ReceiveDataPacket params
[openafs.git] / src / rx / rx_internal.h
index 31f4abf..afef972 100644 (file)
@@ -1,52 +1,78 @@
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- * 
- * This software has been released under the terms of the IBM Public
- * License.  For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
+/* Internal structures that are private to RX itself. These shouldn't be
+ * modified by library callers.
+ *
+ * Data structures that are visible to security layers, but not to
+ * customers of RX belong in rx_private.h, which is installed.
  */
 
-#ifndef _RX_INTERNAL_H_
-#define _RX_INTERNAL_H_
+#ifdef AFS_RXERRQ_ENV
+# if defined(AFS_LINUX26_ENV) || defined(AFS_USR_LINUX26_ENV)
+#  include <linux/types.h>
+#  include <linux/errqueue.h>
+#  include <linux/icmp.h>
+# endif
+#endif
 
-#ifdef AFS_NT40_ENV
-#include "rx.h"
+/* Globals that we don't want the world to know about */
+extern rx_atomic_t rx_nWaiting;
+extern rx_atomic_t rx_nWaited;
 
-/* rx.c */
-int rxi_IsConnInteresting(struct rx_connection *aconn);
-
-/* rx_lwp.c */
-extern void rxi_Delay(int seconds);
-extern void rxi_InitializeThreadSupport(void);
-extern void rxi_Sleep(void *addr);
-extern void rxi_Wakeup(void *addr);
-extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);
-extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
-
-/* rx_packet.c */
-extern void rxi_FreePacket(struct rx_packet *p);
-extern int rxi_AllocDataBuf(struct rx_packet *p, int nb, int class);
-extern void rxi_MorePackets(int apackets);
-extern afs_int32 rx_SlowGetInt32(struct rx_packet *packet, size_t offset);
-extern afs_int32 rx_SlowPutInt32(struct rx_packet *packet, size_t offset, afs_int32 data);
-extern afs_int32 rx_SlowWritePacket(struct rx_packet *packet, int offset,
-                               int resid, char *in);
-extern void rxi_SendPacket(struct rx_connection * conn, struct rx_packet *p,
-                   int istack);
-extern afs_int32 rx_SlowReadPacket(struct rx_packet *packet,
-                              u_int offset, int resid, char *out);
-extern void rxi_FreeAllPackets(void);
+/* How many times to retry sendmsg()-equivalent calls for AFS_RXERRQ_ENV. */
+#define RXI_SENDMSG_RETRY 8
 
-/* rx_user.c */
-extern osi_socket rxi_GetUDPSocket(u_short port);
-extern void rxi_InitPeerParams(struct rx_peer *pp);
+/* Prototypes for internal functions */
 
+/* rx.c */
+extern int rxi_IsRunning(void);
+extern void rxi_CancelDelayedAckEvent(struct rx_call *);
+extern void rxi_PacketsUnWait(void);
+extern void rxi_SetPeerMtu(struct rx_peer *peer, afs_uint32 host,
+                          afs_uint32 port, int mtu);
+#ifdef AFS_RXERRQ_ENV
+extern void rxi_ProcessNetError(struct sock_extended_err *err,
+                                afs_uint32 addr, afs_uint16 port);
+extern int osi_HandleSocketError(osi_socket sock, void *cmsgbuf,
+                                size_t cmsgbuf_len);
+extern void rxi_HandleSocketErrors(osi_socket sock);
+#else
+# define rxi_HandleSocketErrors(sock) do { } while (0)
+#endif
+extern struct rx_peer *rxi_FindPeer(afs_uint32 host, u_short port,
+                                   int create);
+extern struct rx_packet *rxi_ReceivePacket(struct rx_packet *np,
+                                          osi_socket socket, afs_uint32 host,
+                                          u_short port, int *tnop,
+                                          struct rx_call **newcallp);
+extern int rxi_IsConnInteresting(struct rx_connection *aconn);
+extern void rxi_PostDelayedAckEvent(struct rx_call *call, struct clock *now);
+extern void rxi_ConnectionError(struct rx_connection *conn, afs_int32 error);
+extern void rxi_Start(struct rx_call *call, int istack);
+extern void rxi_Send(struct rx_call *call, struct rx_packet *p, int istack);
+extern struct rx_packet *rxi_SendAck(struct rx_call *call,
+                                    struct rx_packet *optionalPacket,
+                                    int serial, int reason, int istack);
+extern struct rx_packet *rxi_SendConnectionAbort(struct rx_connection *conn,
+                                                struct rx_packet *packet,
+                                                int istack, int force);
+extern void rxi_IncrementTimeAndCount(struct rx_peer *peer,
+                                     afs_uint32 rxInterface,
+                                     afs_uint32 currentFunc,
+                                     afs_uint32 totalFunc,
+                                     struct clock *queueTime,
+                                     struct clock *execTime,
+                                     afs_uint64 bytesSent,
+                                     afs_uint64 bytesRcvd,
+                                     int isServer);
+#ifdef RX_ENABLE_LOCKS
+extern void rxi_WaitforTQBusy(struct rx_call *call);
+#else
+# define rxi_WaitforTQBusy(call)
+#endif
 
-/* rx_event.c */
-extern struct rxevent *rxevent_Post(struct clock *when, void (*func)(),
-                            void *arg, void *arg1);
-
+/* rx_packet.h */
 
-#endif /* AFS_NT40_ENV */
-#endif /* _RX_INTERNAL_H_ */
+extern int rxi_SendIovecs(struct rx_connection *conn, struct iovec *iov,
+                         int iovcnt, size_t length, int istack);
+extern void rxi_SendRaw(struct rx_call *call, struct rx_connection *conn,
+                       int type, char *data, int bytes, int istack);
+extern struct rx_packet *rxi_SplitJumboPacket(struct rx_packet *p);