summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1319d78)
The only caller of para_listen() is para_listen_simple(), since
flowops are only used for active sockets.
*
* \param l4type The transport-layer type (\p IPPROTO_xxx).
* \param port The decimal port number to listen on.
*
* \param l4type The transport-layer type (\p IPPROTO_xxx).
* \param port The decimal port number to listen on.
- * \param fo Flowopts (if any) to set before starting to listen.
*
* \return Positive integer (socket descriptor) on success, negative value
* otherwise.
*
* \sa \ref makesock(), ip(7), ipv6(7), bind(2), listen(2).
*/
*
* \return Positive integer (socket descriptor) on success, negative value
* otherwise.
*
* \sa \ref makesock(), ip(7), ipv6(7), bind(2), listen(2).
*/
-int para_listen(unsigned l4type, uint16_t port, struct flowopts *fo)
+int para_listen_simple(unsigned l4type, uint16_t port)
- int ret, fd = makesock(l4type, 1, NULL, port, fo);
+ int ret, fd = makesock(l4type, 1, NULL, port, NULL);
if (fd > 0) {
ret = listen(fd, BACKLOG);
if (fd > 0) {
ret = listen(fd, BACKLOG);
*/
/** How many pending connections queue of a listening server will hold. */
#define BACKLOG 10
*/
/** How many pending connections queue of a listening server will hold. */
#define BACKLOG 10
-extern int para_listen(unsigned l4type, uint16_t port, struct flowopts *fo);
-static inline int para_listen_simple(unsigned l4type, uint16_t port)
-{
- return para_listen(l4type, port, NULL);
-}
+int para_listen_simple(unsigned l4type, uint16_t port);
/** Pretty-printing of IPv4/6 socket addresses */
extern char *remote_name(int sockfd);
/** Pretty-printing of IPv4/6 socket addresses */
extern char *remote_name(int sockfd);