mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
vlserver: Use unsigned addresses
Use unsigned IP addresses in vlserver code. This alters some structures in the public cnvldb.h header. Change-Id: I62725ad98d2c4e8bfe610ae9a6132fd0f54cc4aa Reviewed-on: http://gerrit.openafs.org/2254 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
b65b462c58
commit
38db9afbe9
@ -34,7 +34,7 @@ static char pn[] = "cnvldb";
|
||||
static char tempname[] = "XXnewvldb";
|
||||
static int MaxServers[3] = { 30, 254, 254 }; /* max server # permitted in this version */
|
||||
|
||||
static afs_int32 Conv4to3(afs_int32 addr);
|
||||
static afs_int32 Conv4to3(afs_uint32 addr);
|
||||
|
||||
static void convert_vlentry(int, int, int, struct vlheader_1 *,
|
||||
struct vlheader_1 *, struct vlentry_1 *);
|
||||
@ -742,9 +742,9 @@ convert_header(int ofd, int fd, int fromv, int tov, void *fromaddr,
|
||||
* Before this can be called, the routine read_mhentries must be called.
|
||||
*/
|
||||
static afs_int32
|
||||
Conv4to3(afs_int32 addr)
|
||||
Conv4to3(afs_uint32 addr)
|
||||
{
|
||||
afs_int32 raddr;
|
||||
afs_uint32 raddr;
|
||||
int i;
|
||||
|
||||
if (!base[0] || !addr)
|
||||
|
@ -23,7 +23,7 @@ typedef struct vital_vlheader_1 vital_vlheader1;
|
||||
|
||||
struct vlheader_1 {
|
||||
vital_vlheader1 vital_header;
|
||||
afs_int32 IpMappedAddr[31];
|
||||
afs_uint32 IpMappedAddr[31];
|
||||
afs_int32 VolnameHash[8191];
|
||||
afs_int32 VolidHash[3][8191];
|
||||
};
|
||||
@ -51,7 +51,7 @@ typedef struct vital_vlheader_1 vital_vlheader2;
|
||||
|
||||
struct vlheader_2 {
|
||||
vital_vlheader2 vital_header;
|
||||
afs_int32 IpMappedAddr[255]; /* == 0..254 */
|
||||
afs_uint32 IpMappedAddr[255]; /* == 0..254 */
|
||||
afs_int32 VolnameHash[8191];
|
||||
afs_int32 VolidHash[3][8191];
|
||||
afs_int32 SIT;
|
||||
@ -80,7 +80,7 @@ typedef struct vital_vlheader_1 vital_vlheader3;
|
||||
|
||||
struct vlheader_3 {
|
||||
vital_vlheader3 vital_header;
|
||||
afs_int32 IpMappedAddr[255]; /* == 0..254 */
|
||||
afs_uint32 IpMappedAddr[255]; /* == 0..254 */
|
||||
afs_int32 VolnameHash[8191];
|
||||
afs_int32 VolidHash[3][8191];
|
||||
afs_int32 SIT;
|
||||
|
@ -164,7 +164,7 @@ afs_int32
|
||||
GetServer(char *aname)
|
||||
{
|
||||
register struct hostent *th;
|
||||
afs_int32 addr;
|
||||
afs_uint32 addr;
|
||||
int b1, b2, b3, b4;
|
||||
register afs_int32 code;
|
||||
|
||||
@ -828,7 +828,7 @@ handleit(struct cmd_syndesc *as, void *arock)
|
||||
}
|
||||
free((char *)addrs.bulkaddrs_val);
|
||||
} else if (!strcmp(oper, "mhc")) {
|
||||
afs_int32 serveraddrs[MAXSERVERID + 1][VL_MAXIPADDRS_PERMH];
|
||||
afs_uint32 serveraddrs[MAXSERVERID + 1][VL_MAXIPADDRS_PERMH];
|
||||
afs_int32 serveraddrtype[MAXSERVERID + 1];
|
||||
int nentries1, nentries2, i, j, x, y, unique, found;
|
||||
afs_uint32 *addrp1, *addrp2;
|
||||
|
@ -890,7 +890,7 @@ CheckIpAddrs(struct vlheader *header)
|
||||
int mhblocks = 0;
|
||||
afs_int32 i, j, m, rindex;
|
||||
afs_int32 mhentries, regentries;
|
||||
afs_int32 caddrs[VL_MAX_ADDREXTBLKS];
|
||||
afs_uint32 caddrs[VL_MAX_ADDREXTBLKS];
|
||||
char mhblock[VL_ADDREXTBLK_SIZE];
|
||||
struct extentaddr *MHblock = (struct extentaddr *)mhblock;
|
||||
struct extentaddr *e;
|
||||
|
Loading…
Reference in New Issue
Block a user