Sponsored Content
Top Forums Programming HELP broadcasting client IDs to network in C Post 45851 by dooker on Sunday 4th of January 2004 02:12:33 PM
Old 01-04-2004
Question HELP broadcasting client IDs to network in C

I am trying to write a client server chat program in C and am unsure as to how I would broadcast all the users IDs over the network. At the moment I have the usernames stored in a array clientsock[sock].cl_id, I am able to output this information to the server but am unsure how to transmit this information to all the users.

If someone could help me to understand how to transmit string from an array element over a network I would be very grateful.

Thank you in advance.
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

broadcasting failed 'su root'

hi, if i try to 'su' to root and enter the wrong password, the failed su is broadcastet to all user logged in on the machine. Anyone know where i can stop that broadcast? thanks Lazzar (3 Replies)
Discussion started by: Lazzar
3 Replies

2. UNIX for Advanced & Expert Users

radio broadcasting

hi I wanna make radio broadcasting from my web page. I am planning to use a linux server. I have no idea about how can I do :( I heard about RealPlayer can be used but ,unfortunatelly, I don't know how! Any suggestions and advices are welcome.... thanks... (4 Replies)
Discussion started by: fnoyan
4 Replies

3. Solaris

SPARCstation 5 broadcasting

Hey guys...hopefully this will be a fairly easy one. I've got an old SPARCstation 5 running Sun 5.5.1 that I just hooked up to the network so that I can run HP OpenView. The box is working fine, but it is broadcasting as a boot server. In other words, when co-workers come in and get ready to log... (2 Replies)
Discussion started by: cdunavent
2 Replies

4. Solaris

One time network boot of Jumpstart x86 client

I am trying to find an approach that has been effective for automating the installation of Solaris 10 x86 using Jumpstart technology. I have configured an Jumpstart server and a Solaris dhcp server with appropriate macros for passing the client information about its boot environment. The problem is... (7 Replies)
Discussion started by: chajo19
7 Replies

5. UNIX for Beginners Questions & Answers

Email alert when client in blacklist joins network

I have a textfile with a list of strings I want to monitor in my network. alertlist: hans franz tanzSo it can output for me whenever the a strings it matched: #!/bin/sh while : ; do testfile="/var/media/ftp/alertlist.txt" ] && echo "${testfile##*/} exists." || echo "${testfile##*/}... (9 Replies)
Discussion started by: lowmaster
9 Replies

6. UNIX for Beginners Questions & Answers

List of all ids,groups, privilege ids

I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd. Can someone help me with a script to achieve both. (2 Replies)
Discussion started by: ggayathri
2 Replies
rwhod(8)						      System Manager's Manual							  rwhod(8)

NAME
rwhod - The system status server SYNOPSIS
rwhod [-b|-l] FLAGS
Sets the broadcast only mode. Sends outgoing rwho packets, but ignores incoming ones. Sets the listen only mode. Collects incoming rwho packets from the network, but does not broadcast rwho data. DESCRIPTION
The rwhod daemon is the server that maintains the database used by the rwho(1) and ruptime(1) programs. Its operation is predicated on the ability to broadcast messages on a network. The rwhod server operates as both a producer and consumer of status information. As a producer of information, it periodically queries the state of the system and constructs status messages, which are broadcast on a network. As a consumer of information, it listens for other rwhod servers' status messages, validating them, then recording them in a collection of files located in the /var/rwho directory. The server transmits and receives messages at the port indicated in the rwho service specification; see services(4). The messages sent and received, are of the form: struct outmp { char out_line[8]; /* tty name */ char out_name[8]; /* user id */ long out_time; /* time on */ }; struct whod { char wd_vers; char wd_type; char wd_fill[2]; int wd_sendtime; int wd_recvtime; char wd_hostname[32]; int wd_loadav[3]; int wd_boottime; struct whoent { struct outmp we_utmp; int we_idle; } wd_we[1024 / sizeof (struct whoent)]; }; All fields are converted to network byte order prior to transmission. The load averages are as calculated by the w(1) program, and repre- sent load averages over the 5-, 10-, and 15-minute intervals prior to a server's transmission; they are multiplied by 100 for representa- tion in an integer. The hostname included is that returned by the gethostname(2) system call, with any trailing domain name omitted. The array at the end of the message contains information about the users logged in to the sending machine. This information includes the con- tents of the utmp(4) entry for each nonidle terminal line and a value indicating the time in seconds since a character was last received on the terminal line. Messages received by the rwho server are discarded unless they originated at an rwho server's port. In addition, if the host's name, as specified in the message, contains any unprintable ASCII characters, the message is discarded. Valid messages received by rwhod are placed in files named whod.hostname in the /var/rwho directory. These files contain only the most recent message, in the format previously described. Status messages are generated approximately once every 3 minutes. rwhod performs an nlist(3) on /vmunix every 30 minutes to guard against the possibility that this file is not the system image currently operating. FILES
Specifies the command path RELATED INFORMATION
Commands: rwho(1), ruptime(1) delim off rwhod(8)
All times are GMT -4. The time now is 03:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy