Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Mar 2001 21:54:26 +0600 (NS)
From:      Max Khon <fjoe@iclub.nsu.ru>
To:        freebsd-audit@freebsd.org
Subject:   MAXHOSTNAMELEN
Message-ID:  <Pine.BSF.4.21.0103072153170.43511-100000@iclub.nsu.ru>

next in thread | raw e-mail | index | archive | help
hi, there!

should one allocate buffer of size MAXHOSTNAMELEN or MAXHOSTNAMELEN+1
bytes when using gethostname?

lark:/usr/include$grep -Ir MAXHOSTNAMELEN .
./nfs/nfsdiskless.h:    char            my_hostnam[MAXHOSTNAMELEN]; /*
Client host name */
./nfs/nfsdiskless.h:    char            my_hostnam[MAXHOSTNAMELEN]; /*
Client host name */
./protocols/timed.h:    char tsp_name[MAXHOSTNAMELEN];
./sys/kernel.h:extern char hostname[MAXHOSTNAMELEN];
./sys/kernel.h:extern char domainname[MAXHOSTNAMELEN];
./sys/param.h:#define MAXHOSTNAMELEN    256             /* max hostname
size */
./sys/jail.h:   char            pr_host[MAXHOSTNAMELEN];
./fetch.h:    char       host[MAXHOSTNAMELEN+1];
lark:/usr/include$

/fjoe


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0103072153170.43511-100000>