Coda Distributed File System
Macros | Functions
host.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include "rpc2.private.h"
Include dependency graph for host.c:

Macros

#define HOSTHASHBUCKETS   64
 
#define GOOD_NLE(e)   ((e->Tag == RPC2_STATIC_NLE || e->Tag == RPC2_MEASURED_NLE))
 

Functions

void rpc2_InitHost ()
 
struct HEntryrpc2_GetHost (struct RPC2_addrinfo *addr)
 
void rpc2_FreeHost (struct HEntry **whichHost)
 
void rpc2_GetHostLog (struct HEntry *whichHost, RPC2_NetLog *log, NetLogEntryType type)
 
int rpc2_AppendHostLog (struct HEntry *whichHost, RPC2_NetLogEntry *entry, NetLogEntryType type)
 
void rpc2_ClearHostLog (struct HEntry *whichHost, NetLogEntryType type)
 
void RPC2_UpdateEstimates (struct HEntry *host, RPC2_Unsigned elapsed_us, RPC2_Unsigned InBytes, RPC2_Unsigned OutBytes)
 
int rpc2_RetryInterval (struct CEntry *ce, int retry, struct timeval *tv, RPC2_Unsigned OutBytes, RPC2_Unsigned InBytes, int sftp)
 
int RPC2_GetRTT (RPC2_Handle handle, unsigned long *RTT, unsigned long *RTTvar)
 
int RPC2_GetBandwidth (RPC2_Handle handle, unsigned long *BWlow, unsigned long *BWavg, unsigned long *BWhigh)
 
int RPC2_GetLastObs (RPC2_Handle handle, struct timeval *tv)
 

Macro Definition Documentation

◆ GOOD_NLE

#define GOOD_NLE (   e)    ((e->Tag == RPC2_STATIC_NLE || e->Tag == RPC2_MEASURED_NLE))

◆ HOSTHASHBUCKETS

#define HOSTHASHBUCKETS   64

Function Documentation

◆ rpc2_AppendHostLog()

int rpc2_AppendHostLog ( struct HEntry whichHost,
RPC2_NetLogEntry entry,
NetLogEntryType  type 
)

◆ rpc2_ClearHostLog()

void rpc2_ClearHostLog ( struct HEntry whichHost,
NetLogEntryType  type 
)

◆ rpc2_FreeHost()

void rpc2_FreeHost ( struct HEntry **  whichHost)

◆ RPC2_GetBandwidth()

int RPC2_GetBandwidth ( RPC2_Handle  handle,
unsigned long *  BWlow,
unsigned long *  BWavg,
unsigned long *  BWhigh 
)

◆ rpc2_GetHost()

struct HEntry * rpc2_GetHost ( struct RPC2_addrinfo addr)

◆ rpc2_GetHostLog()

void rpc2_GetHostLog ( struct HEntry whichHost,
RPC2_NetLog log,
NetLogEntryType  type 
)

◆ RPC2_GetLastObs()

int RPC2_GetLastObs ( RPC2_Handle  handle,
struct timeval *  tv 
)

◆ RPC2_GetRTT()

int RPC2_GetRTT ( RPC2_Handle  handle,
unsigned long *  RTT,
unsigned long *  RTTvar 
)

◆ rpc2_InitHost()

void rpc2_InitHost ( void  )

◆ rpc2_RetryInterval()

int rpc2_RetryInterval ( struct CEntry ce,
int  retry,
struct timeval *  tv,
RPC2_Unsigned  OutBytes,
RPC2_Unsigned  InBytes,
int  sftp 
)

◆ RPC2_UpdateEstimates()

void RPC2_UpdateEstimates ( struct HEntry host,
RPC2_Unsigned  elapsed_us,
RPC2_Unsigned  InBytes,
RPC2_Unsigned  OutBytes 
)