From 62c47dc5c9143e6421d1cc96a7f81de72fc4d454 Mon Sep 17 00:00:00 2001 From: schmidt Date: Sun, 13 Sep 1998 02:55:28 +0000 Subject: *** empty log message *** --- apps/drwho/BS_Client.cpp | 16 +-- apps/drwho/BS_Server.cpp | 10 +- apps/drwho/HT_Client.cpp | 18 +-- apps/drwho/HT_Server.cpp | 16 +-- apps/drwho/Hash_Table.cpp | 18 +-- apps/drwho/PMC_All.cpp | 6 +- apps/drwho/PMC_Flo.cpp | 10 +- apps/drwho/PMC_Ruser.cpp | 16 +-- apps/drwho/PMC_Usr.cpp | 6 +- apps/drwho/PMS_All.cpp | 20 +-- apps/drwho/PMS_Flo.cpp | 8 +- apps/drwho/PMS_Ruser.cpp | 14 +- apps/drwho/PMS_Usr.cpp | 8 +- apps/drwho/PM_Client.cpp | 20 +-- apps/drwho/PM_Server.cpp | 8 +- apps/drwho/README | 335 +++++++------------------------------------ apps/drwho/SL_Client.cpp | 2 +- apps/drwho/SL_Server.cpp | 4 +- apps/drwho/Single_Lookup.cpp | 4 +- 19 files changed, 156 insertions(+), 383 deletions(-) (limited to 'apps/drwho') diff --git a/apps/drwho/BS_Client.cpp b/apps/drwho/BS_Client.cpp index 7ca71842b5f..75f4ba2fc23 100644 --- a/apps/drwho/BS_Client.cpp +++ b/apps/drwho/BS_Client.cpp @@ -59,11 +59,11 @@ BS_Client::insert (const char *key_name, int) while (lo <= hi) { int mid = (lo + hi) / 2; - Protocol_Record *frp = sorted_buffer[mid]; + Protocol_Record *prp = sorted_buffer[mid]; int cmp = ACE_OS::strcmp (key_name, - frp->get_login ()); + prp->get_login ()); if (cmp == 0) - return frp; + return prp; else if (cmp < 0) hi = mid - 1; else @@ -77,11 +77,11 @@ BS_Client::insert (const char *key_name, int) Protocol_Record * BS_Client::get_each_entry (void) { - for (Protocol_Record *frp = Binary_Search::get_each_entry (); - frp != 0; - frp = Binary_Search::get_each_entry ()) - if (frp->get_drwho_list () != 0) - return frp; + for (Protocol_Record *prp = Binary_Search::get_each_entry (); + prp != 0; + prp = Binary_Search::get_each_entry ()) + if (prp->get_drwho_list () != 0) + return prp; return 0; } diff --git a/apps/drwho/BS_Server.cpp b/apps/drwho/BS_Server.cpp index 03c3777de42..ab3b348f260 100644 --- a/apps/drwho/BS_Server.cpp +++ b/apps/drwho/BS_Server.cpp @@ -105,11 +105,11 @@ BS_Server::insert (const char *key_name, int max_len) Protocol_Record * BS_Server::get_next_entry (void) { - for (Protocol_Record *frp = Binary_Search::get_next_entry (); - frp != 0; - frp = Binary_Search::get_next_entry ()) - if (frp->get_drwho_list () != 0) - return frp; + for (Protocol_Record *prp = Binary_Search::get_next_entry (); + prp != 0; + prp = Binary_Search::get_next_entry ()) + if (prp->get_drwho_list () != 0) + return prp; return 0; } diff --git a/apps/drwho/HT_Client.cpp b/apps/drwho/HT_Client.cpp index d294416092c..f86407fe090 100644 --- a/apps/drwho/HT_Client.cpp +++ b/apps/drwho/HT_Client.cpp @@ -9,27 +9,27 @@ Protocol_Record * HT_Client::insert (const char *key_name, int max_len) { - Protocol_Record **frpp = 0; + Protocol_Record **prpp = 0; // This is tricky... - for (frpp = &this->hash_table[ACE::hash_pjw (key_name)]; - *frpp != 0 - && ACE_OS::strncmp ((*frpp)->get_login (), + for (prpp = &this->hash_table[ACE::hash_pjw (key_name)]; + *prpp != 0 + && ACE_OS::strncmp ((*prpp)->get_login (), key_name, max_len) != 0; - frpp = &(*frpp)->next_) + prpp = &(*prpp)->next_) continue; - if (*frpp == 0) + if (*prpp == 0) { - ACE_NEW_RETURN (*frpp, + ACE_NEW_RETURN (*prpp, Protocol_Record (ACE::strnew (key_name), - *frpp), + *prpp), 0); this->count_++; } - return *frpp; + return *prpp; } diff --git a/apps/drwho/HT_Server.cpp b/apps/drwho/HT_Server.cpp index 779356baa9b..bdfa013fbc3 100644 --- a/apps/drwho/HT_Server.cpp +++ b/apps/drwho/HT_Server.cpp @@ -9,28 +9,28 @@ Protocol_Record * HT_Server::insert (const char *key_name, int max_len) { - Protocol_Record **frpp = 0; + Protocol_Record **prpp = 0; // This is tricky... - for (frpp = &this->hash_table[ACE::hash_pjw (key_name)]; - *frpp != 0 && strncmp ((*frpp)->get_login (), key_name, max_len) != 0; - frpp = &(*frpp)->next_) + for (prpp = &this->hash_table[ACE::hash_pjw (key_name)]; + *prpp != 0 && strncmp ((*prpp)->get_login (), key_name, max_len) != 0; + prpp = &(*prpp)->next_) continue; - if (*frpp == 0) + if (*prpp == 0) { // Remember, the server must be very careful about stuff it // receives from the rwho manager, since it may not be // NUL-terminated. That's why we use ACE::strnnew ()... - ACE_NEW_RETURN (*frpp, + ACE_NEW_RETURN (*prpp, Protocol_Record (ACE::strnnew (key_name, max_len), - *frpp), + *prpp), 0); this->count_++; } - return *frpp; + return *prpp; } diff --git a/apps/drwho/Hash_Table.cpp b/apps/drwho/Hash_Table.cpp index ed3c80f3ec6..e98122b4bfb 100644 --- a/apps/drwho/Hash_Table.cpp +++ b/apps/drwho/Hash_Table.cpp @@ -33,9 +33,9 @@ Hash_Table::get_next_entry (void) this->current_index++) if (this->hash_table[this->current_index] != 0) { - Protocol_Record *frp = this->hash_table[this->current_index++]; - this->current_ptr = frp->next_; - return frp; + Protocol_Record *prp = this->hash_table[this->current_index++]; + this->current_ptr = prp->next_; + return prp; } this->current_index = -1; @@ -43,9 +43,9 @@ Hash_Table::get_next_entry (void) } else { - Protocol_Record *frp = this->current_ptr; + Protocol_Record *prp = this->current_ptr; this->current_ptr = this->current_ptr->next_; - return frp; + return prp; } } @@ -64,10 +64,10 @@ Hash_Table::~Hash_Table (void) "disposing Hash_Table\n")); for (int i = 0; i < this->hash_table_size; i++) - for (Protocol_Record *frp = this->hash_table[i]; - frp != 0; ) + for (Protocol_Record *prp = this->hash_table[i]; + prp != 0; ) { - Protocol_Record *tmp = frp; - frp = frp->next_; + Protocol_Record *tmp = prp; + prp = prp->next_; } } diff --git a/apps/drwho/PMC_All.cpp b/apps/drwho/PMC_All.cpp index 0f51adc9b4c..5e28711950b 100644 --- a/apps/drwho/PMC_All.cpp +++ b/apps/drwho/PMC_All.cpp @@ -74,13 +74,13 @@ PMC_All::decode (char *packet, int &packet_length) Protocol_Record * PMC_All::insert_protocol_info (Protocol_Record &protocol_record) { - Protocol_Record *frp = PM_Client::insert_protocol_info (protocol_record); - int length = ACE_OS::strlen (frp->set_real (ACE::strnew (protocol_record.get_real ()))); + Protocol_Record *prp = PM_Client::insert_protocol_info (protocol_record); + int length = ACE_OS::strlen (prp->set_real (ACE::strnew (protocol_record.get_real ()))); if (length > this->max_key_length) this->max_key_length = length; - return frp; + return prp; } void diff --git a/apps/drwho/PMC_Flo.cpp b/apps/drwho/PMC_Flo.cpp index 0010b69182f..39265c27658 100644 --- a/apps/drwho/PMC_Flo.cpp +++ b/apps/drwho/PMC_Flo.cpp @@ -36,9 +36,9 @@ PMC_Flo::encode (char *packet, int &packet_length) // Iterate through all the friends, copying them into the packet // buffer. - for (Protocol_Record *frp; (frp = this->get_next_friend ()) != 0; ) + for (Protocol_Record *prp; (prp = this->get_next_friend ()) != 0; ) buf_ptr = ACE::strecpy (buf_ptr, - frp->get_login ()); + prp->get_login ()); packet_length = buf_ptr - packet; @@ -98,13 +98,13 @@ PMC_Flo::decode (char *packet, int &packet_length) Protocol_Record * PMC_Flo::insert_protocol_info (Protocol_Record &protocol_record) { - Protocol_Record *frp = PM_Client::insert_protocol_info (protocol_record); - int length = strlen (frp->get_real ()); + Protocol_Record *prp = PM_Client::insert_protocol_info (protocol_record); + int length = strlen (prp->get_real ()); if (length > this->max_key_length) this->max_key_length = length; - return frp; + return prp; } void diff --git a/apps/drwho/PMC_Ruser.cpp b/apps/drwho/PMC_Ruser.cpp index 886ea459001..79df8bb270c 100644 --- a/apps/drwho/PMC_Ruser.cpp +++ b/apps/drwho/PMC_Ruser.cpp @@ -71,13 +71,13 @@ PMC_Ruser::decode (char *packet, int &packet_length) Protocol_Record * PMC_Ruser::insert_protocol_info (Protocol_Record &protocol_record) { - Protocol_Record *frp = this->ss->insert (protocol_record.get_host (), + Protocol_Record *prp = this->ss->insert (protocol_record.get_host (), MAXHOSTNAMELEN); Drwho_Node *current_node = protocol_record.get_drwho_list (); Drwho_Node *np = this->get_drwho_node (ACE::strnnew (current_node->get_login_name (), MAXUSERIDNAMELEN), - frp->drwho_list_); - int length = ACE_OS::strlen (frp->get_host ()); + prp->drwho_list_); + int length = ACE_OS::strlen (prp->get_host ()); np->set_real_name (ACE::strnew (current_node->get_real_name ())); @@ -89,7 +89,7 @@ PMC_Ruser::insert_protocol_info (Protocol_Record &protocol_record) if (length > this->max_key_length) this->max_key_length = length; - return frp; + return prp; } char * @@ -121,16 +121,16 @@ PMC_Ruser::process (void) else get_name = &Drwho_Node::get_real_name; - for (Protocol_Record *frp; - (frp = this->Protocol_Manager::get_each_friend ()) != 0; + for (Protocol_Record *prp; + (prp = this->Protocol_Manager::get_each_friend ()) != 0; ) { ACE_DEBUG ((LM_DEBUG, "%-*s ", this->max_key_length, - frp->get_host ())); + prp->get_host ())); - for (Drwho_Node *np = frp->get_drwho_list (); ;) + for (Drwho_Node *np = prp->get_drwho_list (); ;) { ACE_DEBUG ((LM_DEBUG, "%s", diff --git a/apps/drwho/PMC_Usr.cpp b/apps/drwho/PMC_Usr.cpp index 7db1f72fedf..ec5738044c3 100644 --- a/apps/drwho/PMC_Usr.cpp +++ b/apps/drwho/PMC_Usr.cpp @@ -70,8 +70,8 @@ PMC_Usr::decode (char *packet, int &packet_length) void PMC_Usr::process (void) { - Protocol_Record *frp = this->get_each_friend (); - Drwho_Node *np = frp->get_drwho_list (); + Protocol_Record *prp = this->get_each_friend (); + Drwho_Node *np = prp->get_drwho_list (); if (np == 0) ACE_DEBUG ((LM_DEBUG, @@ -91,7 +91,7 @@ PMC_Usr::process (void) return; } - for (np = frp->get_drwho_list (); + for (np = prp->get_drwho_list (); np != 0; np = np->next_) if (np->active_count_ == 0) diff --git a/apps/drwho/PMS_All.cpp b/apps/drwho/PMS_All.cpp index 1ed151e1292..b100bd93132 100644 --- a/apps/drwho/PMS_All.cpp +++ b/apps/drwho/PMS_All.cpp @@ -17,7 +17,7 @@ PMS_All::encode (char *packet, int &packet_length) ACE_DEBUG ((LM_DEBUG, "in PMS_All::encode")); - Protocol_Record *frp; + Protocol_Record *prp; char *buf_ptr = packet; sprintf (buf_ptr, @@ -28,12 +28,12 @@ PMS_All::encode (char *packet, int &packet_length) // We only send back info on friends that we actually see logged in. for (; - (frp = this->get_next_friend ()) != 0; + (prp = this->get_next_friend ()) != 0; *buf_ptr++ = '\t') buf_ptr = this->handle_protocol_entries (ACE::strecpy (ACE::strecpy (buf_ptr, - frp->get_login ()), - frp->get_real ()), - frp->get_drwho_list ()); + prp->get_login ()), + prp->get_real ()), + prp->get_drwho_list ()); *buf_ptr++ = '\n'; packet_length = buf_ptr - packet; @@ -75,17 +75,17 @@ PMS_All::decode (char *, int &packet_length) Protocol_Record * PMS_All::insert_protocol_info (Protocol_Record &protocol_record) { - Protocol_Record *frp = PM_Server::insert_protocol_info (protocol_record); - passwd *pwent = getpwnam (frp->get_login ()); - char *cp = (char *) ACE_OS::strchr (frp->set_real + Protocol_Record *prp = PM_Server::insert_protocol_info (protocol_record); + passwd *pwent = getpwnam (prp->get_login ()); + char *cp = (char *) ACE_OS::strchr (prp->set_real (pwent == 0 - ? frp->get_login () : + ? prp->get_login () : ACE::strnew (pwent->pw_gecos)), ','); if (cp != 0) *cp = '\0'; - return frp; + return prp; } PMS_All::PMS_All (void) diff --git a/apps/drwho/PMS_Flo.cpp b/apps/drwho/PMS_Flo.cpp index 7cf2dd73785..03a837ac166 100644 --- a/apps/drwho/PMS_Flo.cpp +++ b/apps/drwho/PMS_Flo.cpp @@ -16,7 +16,7 @@ PMS_Flo::encode (char *packet, int &packet_length) ACE_DEBUG ((LM_DEBUG, "in PMS_Flo::encode")); - Protocol_Record *frp; + Protocol_Record *prp; char *buf_ptr = packet; sprintf (buf_ptr, @@ -27,11 +27,11 @@ PMS_Flo::encode (char *packet, int &packet_length) // We only send back info on friends that we actually see logged in. for (; - (frp = this->get_next_friend ()) != 0; + (prp = this->get_next_friend ()) != 0; *buf_ptr++ = '\t') buf_ptr = this->handle_protocol_entries (ACE::strecpy (buf_ptr, - frp->get_login ()), - frp->get_drwho_list ()); + prp->get_login ()), + prp->get_drwho_list ()); *buf_ptr++ = '\n'; packet_length = buf_ptr - packet; diff --git a/apps/drwho/PMS_Ruser.cpp b/apps/drwho/PMS_Ruser.cpp index bda8f1c79fd..99d3905f44b 100644 --- a/apps/drwho/PMS_Ruser.cpp +++ b/apps/drwho/PMS_Ruser.cpp @@ -17,7 +17,7 @@ PMS_Ruser::encode (char *packet, int &packet_length) ACE_DEBUG ((LM_DEBUG, "in PMS_Ruser::encode")); - Protocol_Record *frp; + Protocol_Record *prp; char *buf_ptr = packet; sprintf (buf_ptr, @@ -28,11 +28,11 @@ PMS_Ruser::encode (char *packet, int &packet_length) // We only send back info on hosts that we actually see. for (; - (frp = this->get_next_friend ()) != 0; + (prp = this->get_next_friend ()) != 0; *buf_ptr++ = '\t') buf_ptr = this->handle_protocol_entries (ACE::strecpy (buf_ptr, - frp->get_host ()), - frp->get_drwho_list ()); + prp->get_host ()), + prp->get_drwho_list ()); *buf_ptr++ = '\n'; packet_length = buf_ptr - packet; @@ -74,11 +74,11 @@ Protocol_Record * PMS_Ruser::insert_protocol_info (Protocol_Record &protocol_record) { Drwho_Node *current_node = protocol_record.get_drwho_list (); - Protocol_Record *frp = this->ss->insert (current_node->get_host_name (), + Protocol_Record *prp = this->ss->insert (current_node->get_host_name (), MAXHOSTNAMELEN); Drwho_Node *np = this->get_drwho_node (ACE::strnnew (protocol_record.get_login (), MAXUSERIDNAMELEN), - frp->drwho_list_); + prp->drwho_list_); if (Options::get_opt (Options::PRINT_LOGIN_NAME)) np->set_real_name (""); @@ -99,7 +99,7 @@ PMS_Ruser::insert_protocol_info (Protocol_Record &protocol_record) else np->active_count_++; - return frp; + return prp; } char * diff --git a/apps/drwho/PMS_Usr.cpp b/apps/drwho/PMS_Usr.cpp index 9456243ef88..ce83f664bce 100644 --- a/apps/drwho/PMS_Usr.cpp +++ b/apps/drwho/PMS_Usr.cpp @@ -24,13 +24,13 @@ PMS_Usr::encode (char *packet, int &packet_length) // We only send back info on friend that is actually logged in. - Protocol_Record *frp = this->get_next_friend (); + Protocol_Record *prp = this->get_next_friend (); - if (frp) + if (prp) { buf_ptr = this->handle_protocol_entries (ACE::strecpy (buf_ptr, - frp->get_login ()), - frp->get_drwho_list ()); + prp->get_login ()), + prp->get_drwho_list ()); *buf_ptr++ = '\t'; } diff --git a/apps/drwho/PM_Client.cpp b/apps/drwho/PM_Client.cpp index 52d85f79565..f34922fee72 100644 --- a/apps/drwho/PM_Client.cpp +++ b/apps/drwho/PM_Client.cpp @@ -10,23 +10,23 @@ Protocol_Record * PM_Client::insert_protocol_info (Protocol_Record &protocol_record) { - Protocol_Record *frp = this->ss->insert (protocol_record.get_login ()); + Protocol_Record *prp = this->ss->insert (protocol_record.get_login ()); Drwho_Node *current_node = protocol_record.get_drwho_list (); Drwho_Node *np = this->get_drwho_node (ACE::strnew (current_node->get_host_name ()), - frp->drwho_list_); + prp->drwho_list_); // Update the active and inactive counts. if (np->get_active_count () < current_node->get_active_count ()) { np->set_active_count (current_node->get_active_count ()); - frp->is_active_ = 1; + prp->is_active_ = 1; } if (np->get_inactive_count () < current_node->get_inactive_count()) np->set_inactive_count (current_node->get_inactive_count ()); - return frp; + return prp; } // This routine does all the dirty work, and actually prints out the @@ -54,16 +54,16 @@ PM_Client::process (void) // Goes through the queue of all the logged in friends and prints // out the associated information. - for (Protocol_Record *frp = this->Protocol_Manager::get_each_friend (); - frp != 0; - frp = this->Protocol_Manager::get_each_friend ()) + for (Protocol_Record *prp = this->Protocol_Manager::get_each_friend (); + prp != 0; + prp = this->Protocol_Manager::get_each_friend ()) { ACE_DEBUG ((LM_DEBUG, - "%c%-*s [", (frp->is_active_ != 0 ? '*' : ' '), + "%c%-*s [", (prp->is_active_ != 0 ? '*' : ' '), this->max_key_length, - (frp->*get_name) ())); + (prp->*get_name) ())); - for (Drwho_Node *np = frp->get_drwho_list (); ;) + for (Drwho_Node *np = prp->get_drwho_list (); ;) { ACE_DEBUG ((LM_DEBUG, np->get_host_name (), diff --git a/apps/drwho/PM_Server.cpp b/apps/drwho/PM_Server.cpp index 3fbb20c5dac..c23214a2f3c 100644 --- a/apps/drwho/PM_Server.cpp +++ b/apps/drwho/PM_Server.cpp @@ -29,18 +29,18 @@ PM_Server::process (void) Protocol_Record * PM_Server::insert_protocol_info (Protocol_Record &protocol_record) { - Protocol_Record *frp = this->ss->insert (protocol_record.get_login ()); + Protocol_Record *prp = this->ss->insert (protocol_record.get_login ()); Drwho_Node *current_node = protocol_record.get_drwho_list (); if (current_node->get_idle_time () < MAX_USER_TIMEOUT) this->increment_total_users (); - if (frp) + if (prp) { Drwho_Node *np = this->get_drwho_node (ACE::strnew (current_node->get_host_name ()), - frp->drwho_list_); + prp->drwho_list_); if (current_node->get_idle_time () >= MAX_USER_TIMEOUT) np->inactive_count_++; @@ -48,7 +48,7 @@ PM_Server::insert_protocol_info (Protocol_Record &protocol_record) np->active_count_++; } - return frp; + return prp; } // Put the inactive and active counts, plus the hostname into the diff --git a/apps/drwho/README b/apps/drwho/README index a8ef4b12fe7..4a4deb69d57 100644 --- a/apps/drwho/README +++ b/apps/drwho/README @@ -1,311 +1,84 @@ -Hi, - - I'm in the finishing stages of writing a program called -'drwho' (short for "Distributed RWHO"), that gets around certain rwho -limitations, adds functionality, and also prints a much prettier -listing of who's logged in around a network. Here's a short blurb -describing the program if you'd like to try it out (don't worry, no -Trojan horses... ;-)). - - The C++ source is in ~schmidt/languages/C++/drwho. It is a -tour de force of Object-Oriented Design and Programming!!! - - Hope you like it! - - Doug - ----------------------------------------- -p.s. Here are some samples. If you'd like to find out who's logged -in around here, try the following commands: - -# Prints out the help file - -% ~schmidt/bin/sun4/drwho -r -h -usage: drwho --? prints a short usage message --A append the following hostname to the list of predefined hostnames. --a return information on *all* users remotely logged in (uses yp passwd). --b run the server in the background (i.e., as a daemon). --d turn on debugging. --F use the following file contents to initialize the host list. --f use the following file contents to initialize the friends database. --H use the following hostname as part of the new list of hostnames. - this option overwrites the existing default names). --h print a long usage message. --L print the login name rather than the real name (which is the default). --l print information in long format (works for all protocols). --p set the port number (server must correspond). --R print info using the rusers format. --r do the remote lookups (i.e., local operations are the default). --t set the amount of time we wait for servers to timeout. --w return information on just one user. +This directory contains the "distributed rwho" (drwho) program. Drwho +alleviates certain rwho(1) limitations. For instance it adds +functionality that spans subnets. In addition, drwho prints a much +more concise listing of who's logged in around a network. + +Below are some examples of how to use drwho. If you'd like to find +out who's logged in around here, try the following commands: + +1. Print out the command-line options. + +% drwho-client -h +usage: ./drwho-client +-? prints a short usage message +-A append the following hostname to the list of predefined hostnames. +-a return information on *all* users remotely logged in (uses yp passwd). +-b run the server in the background (i.e., as a daemon). +-d turn on debugging. +-F use the following file contents to initialize the host list. +-f use the following file contents to initialize the friends database. +-H use the following hostname as part of the new list of hostnames. + (this option overwrites the existing default names). +-h print a long usage message. +-L print the login name rather than the real name (which is the default). +-l print information in long format (works for all protocols). +-p set the port number (server must correspond). +-r do the remote lookups (i.e., local operations are the default). +-R print info using the rusers format. +-s sort the output by login name. +-S sort the output by real name. +-t set the amount of time we wait for servers to timeout. +-w return information on just one user. ---------------------------------------- -# Find out where a particular person is logged in: +2. Find out where a particular person is logged in: -% ~schmidt/bin/sun4/drwho -r -w brodbeck -chateau +% drwho-client -r -w schmidt +tango This is useful for remote commands that require a hostname, e.g.: -% talk brodbeck@`drwho -r -w brodbeck` - -or - -% rsh `drwho-client -w brodbeck` "ps -aux | egrep -v 'root|schmidt'" -USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND -brodbeck 21991 0.0 0.0 108 0 co IW Nov 8 0:10 /usr/bin/X11R4/xclock -r -bin 46 0.0 0.0 36 0 ? IW Oct 15 0:01 ypbind -brodbeck 21907 0.0 0.0 216 0 co IW Nov 8 0:00 -tcsh (tcsh) -brodbeck 22000 0.0 0.0 224 0 p1 IW Nov 8 0:01 -csh (tcsh) -brodbeck 21973 0.0 1.9 864 360 co S Nov 8 2:42 /usr/bin/X11R4/Xsun :0 - -brodbeck 21998 0.0 0.0 212 0 p0 IW Nov 8 0:00 -csh (tcsh) -brodbeck 22001 0.0 0.0 224 0 p3 IW Nov 8 0:02 -csh (tcsh) -brodbeck 22783 0.0 1.4 200 264 p3 S 14:07 0:00 vi one_page_summary -brodbeck 21972 0.0 0.0 40 0 co IW Nov 8 0:00 /usr/bin/X11/xinit -- -l -brodbeck 22803 0.0 0.0 40 0 p1 IW 14:12 0:00 more inbox/37 -brodbeck 21979 0.0 0.0 112 0 co IW Nov 8 0:00 olwm -3 -f -brodbeck 21992 0.0 0.5 108 96 co S Nov 8 0:23 /usr/bin/X11R4/xbiff -bg -brodbeck 21999 0.0 0.0 212 0 p2 IW Nov 8 0:00 -csh (tcsh) +% talk schmidt@`drwho-client -r -w schmidt` or -% foreach host (`drwho -r -l -w brodbeck`) +% rsh `drwho-client -w schmidt` ps + PID TTY TIME CMD + 1844 pts/9 0:01 tcsh_6.0 + 4821 ? 0:02 perfmete + 77 pts/20 0:01 tcsh_6.0 + 4845 pts/2 0:00 tcsh_6.0 + 4766 ? 0:00 xmessage + 4850 pts/3 0:06 tcsh_6.0 + 5057 pts/4 0:01 tcsh_6.0 + 4826 ? 18:07 netscape + 4802 ? 0:07 mwm +% foreach host (`drwho -r -l -w schmidt`) ? echo $host -? rsh $host w | egrep brodbeck +? rsh $host w | egrep schmidt ? end ---------------------------------------- -# Find out which friends are logged in (* means currently active) +3. Find out which friends are logged in (* means currently active) -% drwho -r -f ~schmidt/.friends.dta +% drwho-client -r -f ~schmidt/.friends.dta remote friends logged on ------------------------ - Delectable Debi [chateau] - Chang-Kai Chek [hera] - Gary Gershwin [wagram paris buckaroo ics sherlock] - Andrew Harrison [buckaroo laguna ics cthulu] - Holly Hocs [jourdain] - Dr. Dave [laguna broadway] - Sam Horrocks [brochant paris buckaroo liege laguna ics bonnie john-bigboote] - Well Hung [net5] - Kari Knees [st-michel] - Ionas Rex [ics] - Dr. Ray [bonnie pan clipperton] - Frank Marino [bonnie] - David "fine" Levine [trinite dinsdale segur] - Clark Kent Madsen [pasteur] - Jo Jo Starbuck [segur] - Owen O'Palley [dinsdale porte-de-st-ouen] - Tim Morgan [glacier buckaroo ics john-parker] - Too Thieu [valentine] - Alex Nicolau [ics ck7] - Golden Bear [zola bear] - David Ruby [ics ocean steppingstone] - Elke Summers [aardvark] -*Doug O'las [pasteur beaver* net6*(2) net4] - Karl Marx Schwamb [abp] - Rick Selby [louvre] - this->self [pasteur bugfix] - Sheba [cardinal] - Tatsuda [valentine] - Cindy Twiddle [alexandre-dumas] -*Vanessa Redgrave [bonnie*(2)] - Zippy Ziv [pigalle trinite] ------------------------ friends: 5 users: 168 ---------------------------------------- -# Find out everyone who is logged in everywhere! +4. Find out everyone who is logged in everywhere! -% drwho -r -a +% drwho-client -r -a remote users logged on ------------------------ - Barbara Weisenfluh [sunshine] - Jon Krause [laguna] - David Kramer [olympus] - Cindy Tittle Moore [alexandre-dumas] - Karl Schwamb [abp] -*Anh Hoang Tran [bonnie*] - Adam Uthcritam [buckaroo] - Harry Yessayan [chapelle] - Girish Kotmire [legion] -*Udhw68k [ics*] - Ruben Ernesto Ortega [simplon] - Jeanne Pickering [poisson] - Hai-Geng Wang [ics buckaroo esp cy4] - Keith A. Marino [bonnie] - cinouye [bonnie] - Mark Rentmeesters [laguna siam] - Heping He [crimee monceau] -*David Kakichi Kauahao Nitta [bonnie*] - Umesh Krishnaswamy [calliope] - David Kolson [purple] - Eddie Schwalb [cliff ocean broadway] - Phillip Raymond Colline [bonnie] - Scott Erickson [ics paris wagram buckaroo sherlock] - Doris Tonne [bonnie] - Alan Keren [brooks] - Debra Brodbeck [chateau] -*Uocsqnt [ics*] - Chung Ng [liege trocadero] -*John Romine [bonnie ics london woolamaloo paris buckaroo*(1) philosophy yoyodyne beaver] - Lisa Tellier [coyote] - Merri Naka [perfect-tommy] - David Eppstein [wormwood] - Heather Ross [bonnie ics paris john-yaya] -*Gary Hiromi Nakamura [bonnie*] - James Kipps [ocean] - Kamal Ali [pan ci4 focl] - Xiping Song [berault] -*Up4tusti [ics*] - Robert Allen Monroe [bonnie] - Craig Snider [gobelins] - Jose C. Barrios [chatelet] - Lynn Stauffer [cg3] -*Alastair Milne [ics*] - David Levine [trinite dinsdale segur] - Operator [laguna bonnie ics woolamaloo paris rome cecil buckaroo beanie philosophy] - Mary Franks [john-starbird] - Roni Potasman [esp enterprise] -*jli1 [bonnie*] - Wendy Lasher [voltaire] - John King [ics] -*skeung [bonnie*] - David Harnick-Shapiro [laguna bonnie ics woolamaloo glacier paris buckaroo beanie john-littlejohn john-yaya esp valentine] - Dennis Kibler [turing] -*Vanessa Yun-Yin Yuan [bonnie*(2)] - Tedd Hadley [etoile] - Hung Huang [net5] - George S. Lueker [john-wood] - Rina Dechter [john-grim] - Elke A. Rundensteiner [aardvark] - Richard Selby [louvre] - Thanh Lan Vu [bonnie] -*Steven Lafayette Smith [bonnie*] - Owen O'Malley [dinsdale porte-de-st-ouen] -*Dennis Troup [sainte-denis*(1)] - Alex Odyniec [ics] - Patrick Young [elysees] - Lubomir Bic [cj2] -*ryoshii [ics*] - Carmen Mendoza [anniebell] - Gregory Alan Bolcer [liege javel crimee] -*El Fattah [trix*(1)] -*Mei-Fan Chou [bonnie*] - X-MAN [net1] - Fei York Yee [bonnie] - Nikil Dutt [ics synthesis] - Sam Horrocks [laguna liege bonnie ics paris buckaroo brochant john-bigboote] - Alfred Bork [idyllwild] -*M i n h [bonnie*] - Ray Klefstad [bonnie pan clipperton] - Thieu Q. Nguyen [valentine] - Debra Richardson [zola bear] -*sjalali [bonnie*] - R. Kent Madsen [pasteur] -*Donna Rae Love [bonnie*] - Brian Christopher Pitterle [fdr] -*Shilpa V. Shukla [bonnie*] - Earl Wayne Jr. Hood [bonnie] - Young Kim [myrtle] - Stephanie Leif Aha [cardinal] -*Steven Daniel Wallace [bonnie*] - Szu-Ching Wang [bonnie] - Patrick Murphy [focl] - Paul O'Rorke [ci2] - Craig Alan Macfarlane [liege chateau-rouge] - Mats Heimdahl [duroc] - CF Engineer [ics] -*dialup [ics*] - Ki C. Kim [cy2] - Hadar Ziv [pigalle trinite] - Software Testing group [liege siam] - David Ruby [ics ocean steppingstone] -*Stephen Te-Lung Chen [bonnie*] - Michael Dillencourt [cubes] -*hlin1 [bonnie*] - Andrew Harrison [laguna ics buckaroo cthulu] - Ken Anderson [mabillon] - Alex Nicolau [ics ck7] -*John Richard Place [bonnie*(2)] -*Douglas C. Schmidt [pasteur beaver* net6*(2) net4] - Holly Hildreth [jourdain] - Kari Forester [st-michel] - Joy Schuler [scooter] - Michael Pazzani [pan] - Kazushige Shimono [valentine] - Joan Mahoney [segur] - John Self [pasteur bugfix] - Steve Morris [tweezer] - Isaac D Scherson [zeus] -*Dongpei Zhuo [bonnie*(2)] - Pat Harris [surrey] -*Robert Steven Zucker [siam*] - Tatsuya Suda [valentine] - Jeff Erickson [madeleine] - David A. Honig [laguna broadway] - Chi-Kai Chien [hera] - Dan Gajski [ics] -*Steven Novack [snowball*(1)] -*Chung Tak Wong [bonnie*(1)] - Tim Morgan [ics glacier buckaroo john-parker] -*Stephen James Martin [bonnie*] - Billie Bozarth [etoile jasmin] - You have new mail. [liege dinsdale ternes] -*Chiharu Sano [bonnie*] - Fran Paz [willis] ------------------------ friends: 37 users: 163 ---------------------------------------- -# Print out all machines and who is logged into each one +5. Print out all machines and who is logged into each one -% drwho -R -l -drwho-client -R -L -beanie operator -crimee harrison hhe -siam mrentme -alexandre-dumas tittle -avron heimdahl -cecil operator -elysees pyoung -pasteur madsen*(1) -sainte-denis troup -gobelins snider -bugfix self -mabillon kanderso*(3) -buckaroo operator david sam authcrit wang harrison jromine morgan yin -rome operator sam -paris operator jromine sam david heather -chateau brodbeck*(1) -wagram sam -simplon rortega -jourdain hildreth -javel gbolcer -bastille self schmidt*(1) -monceau hhe -glacier hhe david morgan -porte-de-st-ouen omalley -berault song -laguna operator harrison sam david jromine jkrause mrentme kanderso*(1) -jasmin bozarth -chateau-rouge cmacfarl -zola sam omalley -invalides mrentme -london operator jromine -brochant gbolcer -rennes steph -pigalle ziv -aardvark rundenst -chapelle yessayan -cad jianl*(1) -liege cmacfarl kari aporter yessayan rzucker sam -woolamaloo operator -st-michel kari -segur jmahoney -philosophy operator -sablon rundenst -dinsdale cmacfarl yessayan sam +% drwho-client -R -l ---------------------------------------- diff --git a/apps/drwho/SL_Client.cpp b/apps/drwho/SL_Client.cpp index ad301e9d7ac..50a5a60fa07 100644 --- a/apps/drwho/SL_Client.cpp +++ b/apps/drwho/SL_Client.cpp @@ -11,5 +11,5 @@ SL_Client::SL_Client (const char *usr_name) Protocol_Record * SL_Client::insert (const char *, int) { - return this->frp; + return this->prp; } diff --git a/apps/drwho/SL_Server.cpp b/apps/drwho/SL_Server.cpp index 394f5936e39..d6d1a1e32af 100644 --- a/apps/drwho/SL_Server.cpp +++ b/apps/drwho/SL_Server.cpp @@ -19,7 +19,7 @@ Protocol_Record * SL_Server::insert (const char *key_name, int max_len) { return ACE_OS::strncmp (key_name, - this->frp->get_login (), - max_len) == 0 ? this->frp : 0; + this->prp->get_login (), + max_len) == 0 ? this->prp : 0; } diff --git a/apps/drwho/Single_Lookup.cpp b/apps/drwho/Single_Lookup.cpp index 98805fbe73c..80480a081a1 100644 --- a/apps/drwho/Single_Lookup.cpp +++ b/apps/drwho/Single_Lookup.cpp @@ -5,7 +5,7 @@ Single_Lookup::Single_Lookup (const char *usr_name) { - ACE_NEW (this->frp, + ACE_NEW (this->prp, Protocol_Record (ACE::strnew (usr_name))); } @@ -19,7 +19,7 @@ Single_Lookup::~Single_Lookup (void) Protocol_Record * Single_Lookup::get_each_entry (void) { - return this->frp; + return this->prp; } Protocol_Record * -- cgit v1.2.1