version 1.19, 2014/01/06 12:38:10 |
version 1.20, 2015/01/16 06:40:06 |
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
#include <sys/param.h> |
|
#include <sys/socket.h> |
#include <sys/socket.h> |
#include <netinet/in.h> |
#include <netinet/in.h> |
#include <sys/cdio.h> |
#include <sys/cdio.h> |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
#include <limits.h> |
#include <vis.h> |
#include <vis.h> |
#include "extern.h" |
#include "extern.h" |
|
|
|
|
void |
void |
send_hello(FILE *cout) |
send_hello(FILE *cout) |
{ |
{ |
char hostname[MAXHOSTNAMELEN]; |
char hostname[HOST_NAME_MAX+1]; |
|
|
if (gethostname(hostname, sizeof(hostname)) == -1) |
if (gethostname(hostname, sizeof(hostname)) == -1) |
strlcpy(hostname, "unknown", sizeof hostname); |
strlcpy(hostname, "unknown", sizeof hostname); |