Copyright 2002 Stephan Uhlmann
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
0
Interprozesskommunikation
1
Lock files
1
File locks
1
Pipes
1
Pipes
1
1
Pipes
1
Named Pipes
1
System V IPC
1
Semaphoren
1
1
Semaphoren
1
Message queues
1
1
Message queues
1
Message queues
1
Shared memory
1
1
Shared memory
1
ipcs / ipcrm
1
IPC mit Sockets
1
IPC mit Sockets
1
IPC-Art | Beziehung | Datenaustausch |
Lock files | 1:n | nein |
File locks | 1:n | ja |
Pipes | 1:1 | ja |
Named Pipes | 1:1 | ja |
Semaphoren | n:m | nein |
Message queues | 1:1 | ja |
Shared memory | n:m | ja |
Sockets | 1:n | ja |
1
Netzwerkkommunikation
1
1
BSD-Socket
int listen(int s, int backlog);
int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);
int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
int send(int s, const void *msg, size_t len, int flags);
int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
int recv(int s, void *buf, size_t len, int flags);
int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen);
1
BSD-Socket
unsigned long flags;
struct proto_ops *ops;
struct inode *inode;
struct fasync_struct *fasync_list;
struct file *file;
struct sock *sk;
wait_queue_head_t wait;
short type;
unsigned char passcred;
};
1
1
BSD-Socket
1
INET-Socket
1
struct sk_buff_head receive_queue;
struct sk_buff_head write_queue;
struct proto *prot;
union {
struct tcp_opt af_tcp;
struct raw_opt tp_raw4;
struct raw6_opt tp_raw;
struct spx_opt af_spx;
} tp_pinfo;
union {
struct unix_opt af_unix;
struct inet_opt af_inet;
struct atalk_sock af_at;
struct ipx_opt af_ipx;
...
} protinfo;
...
};
1
INET-Socket
inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr, int addr_len, int flags); extern inet_accept(struct socket *sock,
inet_listen(struct socket *sock, int backlog);
inet_accept(struct socket *sock, struct socket *newsock, int flags);
inet_recvmsg(struct socket *sock, struct msghdr *ubuf, int size, int flags, struct scm_cookie *scm);
inet_sendmsg(struct socket *sock, struct msghdr *msg, int size, struct scm_cookie *scm);
inet_shutdown(struct socket *sock, int how);
inet_setsockopt(struct socket *sock, int level, int optname, char *optval, int optlen);
inet_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen);
1
INET-Socket
1
TCP/UDP
1
TCP/UDP
1
IP
1
1
IP - Empfangen:
1
IP - Weiterleiten
int ip_forward(struct sk_buff *skb)
[net/ipv4/ip_forward.c]
1
IP - Senden
1
Netzwerkgeräte
1
Netzwerkgeräte
1