static void CD_f (void)
{
- char *command;
- int ret;
- int n;
+ const char *command;
+ int ret;
+ int n;
if (Cmd_Argc() < 2)
return;
the local network components to fill in the rest
============
*/
-static int PartialIPAddress (char *in, struct qsockaddr *hostaddr)
+static int PartialIPAddress (const char *in, struct qsockaddr *hostaddr)
{
char buff[256];
char *b;
//=============================================================================
-char *WINS_AddrToString (struct qsockaddr *addr)
+char *WINS_AddrToString (const struct qsockaddr *addr)
{
static char buffer[22];
int haddr;
//=============================================================================
-int WINS_StringToAddr (char *string, struct qsockaddr *addr)
+int WINS_StringToAddr (const char *string, struct qsockaddr *addr)
{
int ha1, ha2, ha3, ha4, hp;
int ipaddr;
//=============================================================================
-int WINS_GetNameFromAddr (struct qsockaddr *addr, char *name)
+int WINS_GetNameFromAddr (const struct qsockaddr *addr, char *name)
{
struct hostent *hostentry;
//=============================================================================
-int WINS_GetAddrFromName(char *name, struct qsockaddr *addr)
+int WINS_GetAddrFromName(const char *name, struct qsockaddr *addr)
{
struct hostent *hostentry;
//=============================================================================
-int WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2)
+int WINS_AddrCompare (const struct qsockaddr *addr1, const struct qsockaddr *addr2)
{
if (addr1->sa_family != addr2->sa_family)
return -1;
int WINS_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr);
int WINS_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr);
int WINS_Broadcast (int socket, qbyte *buf, int len);
-char *WINS_AddrToString (struct qsockaddr *addr);
-int WINS_StringToAddr (char *string, struct qsockaddr *addr);
+char *WINS_AddrToString (const struct qsockaddr *addr);
+int WINS_StringToAddr (const char *string, struct qsockaddr *addr);
int WINS_GetSocketAddr (int socket, struct qsockaddr *addr);
-int WINS_GetNameFromAddr (struct qsockaddr *addr, char *name);
-int WINS_GetAddrFromName (char *name, struct qsockaddr *addr);
-int WINS_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2);
+int WINS_GetNameFromAddr (const struct qsockaddr *addr, char *name);
+int WINS_GetAddrFromName (const char *name, struct qsockaddr *addr);
+int WINS_AddrCompare (const struct qsockaddr *addr1, const struct qsockaddr *addr2);
int WINS_GetSocketPort (struct qsockaddr *addr);
int WINS_SetSocketPort (struct qsockaddr *addr, int port);
//=============================================================================
-char *WIPX_AddrToString (struct qsockaddr *addr)
+char *WIPX_AddrToString (const struct qsockaddr *addr)
{
static char buf[28];
//=============================================================================
-int WIPX_StringToAddr (char *string, struct qsockaddr *addr)
+int WIPX_StringToAddr (const char *string, struct qsockaddr *addr)
{
int val;
char buf[3];
//=============================================================================
-int WIPX_GetNameFromAddr (struct qsockaddr *addr, char *name)
+int WIPX_GetNameFromAddr (const struct qsockaddr *addr, char *name)
{
strcpy(name, WIPX_AddrToString(addr));
return 0;
//=============================================================================
-int WIPX_GetAddrFromName(char *name, struct qsockaddr *addr)
+int WIPX_GetAddrFromName(const char *name, struct qsockaddr *addr)
{
int n;
char buf[32];
int WIPX_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr);
int WIPX_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr);
int WIPX_Broadcast (int socket, qbyte *buf, int len);
-char *WIPX_AddrToString (struct qsockaddr *addr);
-int WIPX_StringToAddr (char *string, struct qsockaddr *addr);
+char *WIPX_AddrToString (const struct qsockaddr *addr);
+int WIPX_StringToAddr (const char *string, struct qsockaddr *addr);
int WIPX_GetSocketAddr (int socket, struct qsockaddr *addr);
-int WIPX_GetNameFromAddr (struct qsockaddr *addr, char *name);
-int WIPX_GetAddrFromName (char *name, struct qsockaddr *addr);
+int WIPX_GetNameFromAddr (const struct qsockaddr *addr, char *name);
+int WIPX_GetAddrFromName (const char *name, struct qsockaddr *addr);
int WIPX_AddrCompare (struct qsockaddr *addr1, struct qsockaddr *addr2);
int WIPX_GetSocketPort (struct qsockaddr *addr);
int WIPX_SetSocketPort (struct qsockaddr *addr, int port);