06-26-2001
Include files
Hi,
I am new to the unix networking.
I have written one client and server for UDP sockets..
I got the following errors while conpilation
I have include all include files.
Could some one help ...is there any other file to be included.....?
will the include files change on different unix machines?
I use sequent.
error while compilation
undefined symbol first reference in file
_bsd_accept client.o
_bsd_bind client.o
....
..
I have included
#include ipc_config.h>
#include string.h>
#include stdlib.h>
#include sys/types.h>
#include sys/socket.h>
#include netinet/in.h>
#include arpa/inet.h>
TIA
reddyb
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
Simple question about tcsh , i like to make external file that some tcsh script
will read from him var=="some value"
how can i make the include in tcsh files?
Thanks (0 Replies)
Discussion started by: umen
0 Replies
2. Shell Programming and Scripting
I want to include all the subnet files under /etc/dhcpd/ to /etc/dhcpd.conf
so here is my content of dhcpd.conf
...
include "/etc/dhcpd/*";
however, the check-syntax reports syntax error, as they do not recognize the wildcard *, and display that " file /etc/dhcpd/* could not be found.
... (4 Replies)
Discussion started by: fredao
4 Replies
3. Programming
Hi there!
gcc seems not to include available files, see below:
What should I do?
Look forward to your reply/replies!
Thanks
Grahamb
In the source directory I enter:
#gcc -Wall -I/usr/include ./gtkdaq.c > ./out.log 2>&1
Response:
In file included from ./gtkdaq.c:3:... (2 Replies)
Discussion started by: grahamb
2 Replies
4. Solaris
Hey there,
This is gotta be a stupid question, if there ever was one, but I am learning a lot by asking such questions.
Now I am trying to build this humungous library, which has all kinds a dependencies, which I realize as it makes, and i download all those dependent libs.
The compilation is... (1 Reply)
Discussion started by: shriyer123
1 Replies
5. Solaris
Our admin has upgraded our OS solaris system to 5.11 but no more I can compile any trivial or non-trivial code. I'm trying to compile a trivial c++ program(a Helloworld program) but It gives error indicating that include files do not exist (in this trivial case <stdio.h>), it starts compiling but... (1 Reply)
Discussion started by: Newsha
1 Replies
6. UNIX for Dummies Questions & Answers
what is the relationship between
/usr/include/sys/*.h
and
/usr/include/unistd.h ?
Fuctions in unistd.h are syscalls. Do the fuctions in sys/*.h call syscalls? (7 Replies)
Discussion started by: vistastar
7 Replies
7. Shell Programming and Scripting
I've written the script below to merge only .txt files that exist in one directory into one huge .txt file and ignore other files with other extensions.
now the result is one huge .txt file with all the contents of other .txt files
how can i add a File Name as a comment before each file?
... (12 Replies)
Discussion started by: miss_dodi
12 Replies
8. HP-UX
I am trying to compile a file called PPFormatageMUT.c in which I have included header file which are at some other location but the point is that while compiling the file, it is throwing error saying that
error : no such file or directory
source code location:... (1 Reply)
Discussion started by: ezee
1 Replies
9. Shell Programming and Scripting
I wrote this korn script and ran into a hole. I can use find to exclude all the hidden directories and to use my include file/exclude files for running a full backup
find / -depth -ipath '/home/testuser/.*' -prune -o -print| grep -f include.mydirs | grep -v -f exclude.mydirs
but when I... (8 Replies)
Discussion started by: metallica1973
8 Replies
10. Programming
I have an implementation file tomog.cpp that implements a class called Tomog where I need to include its header file which resides in another place.
How can I best specify the include file? I would not like to do
#include "../../tomso/tomography/tomog.hpp"
I wish to do instead
... (3 Replies)
Discussion started by: kristinu
3 Replies
UDP(4) BSD Kernel Interfaces Manual UDP(4)
NAME
udp -- Internet User Datagram Protocol
SYNOPSIS
#include <sys/socket.h>
#include <netinet/in.h>
int
socket(AF_INET, SOCK_DGRAM, 0);
int
socket(AF_INET6, SOCK_DGRAM, 0);
DESCRIPTION
UDP is a simple, unreliable datagram protocol which is used to support the SOCK_DGRAM abstraction for the Internet protocol family. UDP
sockets are connectionless, and are normally used with the sendto(2) and recvfrom(2) calls, though the connect(2) call may also be used to
fix the destination for future packets (in which case the recv(2) or read(2) and send(2) or write(2) system calls may be used).
UDP address formats are identical to those used by TCP. In particular UDP provides a port identifier in addition to the normal Internet
address format. Note that the UDP port space is separate from the TCP port space (i.e. a UDP port may not be ``connected'' to a TCP port).
In addition broadcast packets may be sent (assuming the underlying network supports this) by using a reserved ``broadcast address''; this
address is network interface dependent.
There are two UDP-level setsockopt(2)/getsockopt(2) options. UDP_OPTIONS may be used to change the default behavior of the socket. For
example:
setsockopt(s, IPPROTO_UDP, UDP_OPTIONS, NULL, 0);
The UDP_ENCAP option can be used to encapsulate ESP packets in UDP. There are two valid enapsulation options: UDP_ENCAP_ESPINUDP_NON_IKE
from draft-ietf-ipsec-nat-t-ike-00/01 and UDP_ENCAP_ESPINUDP from draft-ietf-ipsec-udp-encaps-06 defined in <netinet/udp.h>.
The UDP_RFC6056ALGO can be used to randomize the port selection. Valid algorithms are described in rfc6056(7) and their respective constants
are in <netinet/rfc6056.h>. For example,
int algo = RFC6056_ALGO_RANDOM_PICK; /* see <netinet/rfc6056.h> */
setsockopt(s, IPPROTO_UDP, UDP_RFC6056ALGO, &algo, sizeof(algo));
The port selection can be also controlled at a global level for all UDP or UDP6 sockets using the following sysctl(7) variables:
net.inet.udp.rfc6056.selected and net.inet6.udp6.rfc6056.selected respectively.
Options at the IP transport level may be used with UDP; see ip(4) or ip6(4).
DIAGNOSTICS
A socket operation may fail with one of the following errors returned:
[EISCONN] when trying to establish a connection on a socket which already has one, or when trying to send a datagram with the destina-
tion address specified and the socket is already connected;
[ENOTCONN] when trying to send a datagram, but no destination address is specified, and the socket hasn't been connected;
[ENOBUFS] when the system runs out of memory for an internal data structure;
[EADDRINUSE] when an attempt is made to create a socket with a port which has already been allocated;
[EADDRNOTAVAIL] when an attempt is made to create a socket with a network address for which no network interface exists.
SEE ALSO
getsockopt(2), recv(2), send(2), socket(2), inet(4), inet6(4), intro(4), ip(4), ip6(4), rfc6056(7), sysctl(7)
User Datagram Protocol, RFC, 768, August 28, 1980.
Requirements for Internet Hosts -- Communication Layers, RFC, 1122, October 1989.
HISTORY
The udp protocol appeared in 4.2BSD.
BSD
September 24, 2011 BSD