To send a message to another system


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users To send a message to another system
Prev   Next
# 1  
Old 06-06-2007
To send a message to another system

How to send a message to another unix terminal along with the date specified
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Curl, to send text message

hello friends I need to send a text message MSM by AIX with a function called CURL you have some example of how it is done so that you can help me please (4 Replies)
Discussion started by: tricampeon81
4 Replies

2. Post Here to Contact Site Administrators and Moderators

Cannot send new Private Message (PM)

To be able to send PMs your post count must be 10 or greater. You currently have 16 posts. If you have a question for the forum moderators and/or administrators, please post your question here. ...you might want to try searching the forums: What am I doing wrong? (3 Replies)
Discussion started by: -=XrAy=-
3 Replies

3. Programming

[Solved] how to send an integer via message queue?

how can i send an integer via message queue? i try this, but it doesn't work, child process receive 13345943 instead of 5 #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/msg.h> #include <sys/ipc.h> #include <sys/sem.h> #include <errno.h> #include <unistd.h>... (2 Replies)
Discussion started by: tafazzi87
2 Replies

4. Red Hat

[help] how to send wall/broadcast message to all clients

Hi, as per title, please help me.. I use command wall host1 host2 hellowwwww but it only receive in the host1.. how can I send this to all the clients.. I want this 1 server to send to all the clients.. or is there any program that I can use? I know this openfire, but seems complicated since... (5 Replies)
Discussion started by: flekzout
5 Replies

5. UNIX for Dummies Questions & Answers

send message to a remote system

I am analyzing snoop output and want to send "Hello world" to a remote system. I want to see if the message received is encrypted or not. can I use ping to send a text message? like ping "helloworld" <IP Addr> Please help. Thank you (5 Replies)
Discussion started by: rakeshou
5 Replies

6. Shell Programming and Scripting

error-when trying to send the message thru email.

Hi All, I want to send a message through email. I have written below code. But it is not worling. Anybody has idea, why it is not working?. export $file1=$home1/pip1.$$ mailx -s "This Message from unix" abc@yahoo.com< $file1 thanks,Mary. (5 Replies)
Discussion started by: MARY76
5 Replies

7. UNIX for Dummies Questions & Answers

Send message from Unix to PC

What is the best way to send message from Unix script to PC users connected to the box ? I tried "smbclient -M <machine>" but doesn't work. I prefer not to use Samba. Thanks. (3 Replies)
Discussion started by: mnagaya
3 Replies

8. Shell Programming and Scripting

How to Send warning message to user

Hai..I have one question in unix Shell script.Following is the script System Configuration: lcpu=4 mem=8192MB kthr memory page faults cpu ----- ----------- ------------------------ ------------ ----------- r b avm fre re pi po fr sr cy ... (1 Reply)
Discussion started by: sollin
1 Replies

9. UNIX for Dummies Questions & Answers

send message across terminals

Hello: How would you send message to other unix users logged in into the system now.. what should i verify, before sending them a mail across that displays mesage on the terminal. Any man pages? Thanks, ST2000 (2 Replies)
Discussion started by: ST2000
2 Replies

10. Cybersecurity

Sendmail keep a user from send message

Hello, i have a problem with my sendmail, i want' to keep a user from sending mail, how can i process ? My user is titi, and i don't want' that titi can't send mail via sendmail is it possible ? thnak a lot (1 Reply)
Discussion started by: westside
1 Replies
Login or Register to Ask a Question
send(2) 							System Calls Manual							   send(2)

Name
       send, sendto, sendmsg - send a message from a socket

Syntax
       #include <sys/types.h>
       #include <sys/socket.h>

       cc = send(s, msg, len, flags)
       int cc, s;
       char *msg;
       int len, flags;

       cc = sendto(s, msg, len, flags, to, tolen)
       int cc, s;
       char *msg;
       int len, flags;
       struct sockaddr *to;
       int tolen;

       cc = sendmsg(s, msg, flags)
       int cc, s;
       struct msghdr msg[];
       int flags;

Description
       The  and system calls are used to transmit a message to another socket.	The system call may be used only when the socket is in a connected
       state, while the and system calls may be used at any time.

       The address of the target is given by to, with tolen specifying its size.  The length of the message is given by len.  If  the  message	is
       too  long  to  pass atomically through the underlying protocol, the error EMSGSIZE is returned, and the message is not transmitted.  If the
       address specified in the argument is a broadcast address, the SO_BROADCAST option must be set for broadcasting to succeed.

       No indication of failure to deliver is implicit in a Return values of -1 indicate some locally detected errors.

       If no messages space is available at the socket to hold the message to be transmitted, normally blocks, unless the socket has  been  placed
       in nonblocking I/O mode.  The call can be used to determine when it is possible to send more data.

       The flags parameter can be set to MSG_OOB to send out-of-band data on sockets that support this features (for example, SOCK_STREAM).

       See for a description of the msghdr structure.

       The call returns the number of characters sent, or -1 if an error occurred.

Diagnostics
       [EBADF]		   An invalid descriptor was specified.

       [EDESTADDRREQ]	   A required address was omitted from an operation on a socket.

       [EFAULT] 	   An invalid user space address was specified for a parameter.

       [EINVAL] 	   An invalid argument length for the message was specified.

       [EINTR]		   The send was interrupted by delivery of a signal.

       [ENOTCONN]	   The socket is not connected.

       [ENOTSOCK]	   The argument s is not a socket.

       [EMSGSIZE]	   The socket requires that messages be sent atomically, and the size of the message to be sent made this impossible.

       [EPIPE]		   A write on a pipe or socket for which there is no process to read the data.

       [EWOULDBLOCK]	   The socket is marked nonblocking, and the requested operation would block.

See Also
       recv(2), getsockopt(2), socket(2)

																	   send(2)