- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: get the IP address of the current telnet sessi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2005 10:24 PM
тАО09-08-2005 10:24 PM
I would like to know if there is a way I can find out the IP address of my current telnet or ssh session with C functions. HPUX 11.11, untrusted system.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2005 10:35 PM
тАО09-08-2005 10:35 PM
SolutionFrom the shell you can get this information with: -
who -mu (the last field is the hostname/ip address)
If you want to do this with C calls you'll have to use the getut calls.
man 3 getut
for more details.
- Tags:
- utmps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2005 04:35 AM
тАО09-09-2005 04:35 AM
Re: get the IP address of the current telnet session with C function
I will try and I will publish my result... after my holliday.
Joel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2005 12:22 AM
тАО10-03-2005 12:22 AM
Re: get the IP address of the current telnet session with C function
The code I included shows how I do this.
I am a beginner with c language, excuse me for possible mistake...
bye
Joel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2005 12:31 AM
тАО10-03-2005 12:31 AM
Re: get the IP address of the current telnet session with C function
Attached is working good.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2005 12:34 AM
тАО10-03-2005 12:34 AM
Re: get the IP address of the current telnet session with C function
device name : pts/tb
pid : 15458
type of entry : 7
Process termination status : 0
Process exit status : 3
seconds time entry was made : 1127917725
microseconds time entry was made : 0
my device name : pts/0
user login name : root
id : ts/0
device name : pts/0
pid : 12718
type of entry : 7
Process termination status : 0
Process exit status : 0
seconds time entry was made : 1128328306
microseconds time entry was made : 517252
............
............
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-03-2005 02:23 AM
тАО10-03-2005 02:23 AM
Re: get the IP address of the current telnet session with C function
- Tags:
- getpeername
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2005 10:32 PM
тАО10-04-2005 10:32 PM
Re: get the IP address of the current telnet session with C function
Joel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2005 11:34 PM
тАО10-04-2005 11:34 PM