]> git.proxmox.com Git - mirror_ovs.git/blame - lib/stream-fd.h
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / lib / stream-fd.h
CommitLineData
c34b65c7 1/*
c2e3cbaf 2 * Copyright (c) 2008, 2009, 2012, 2014, 2015 Nicira, Inc.
c34b65c7
BP
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
6500157f
LS
15 *
16 * Note on windows platform, stream fd can only handle sockets, on unix any
17 * fd is acceptable.
c34b65c7
BP
18 */
19
20#ifndef STREAM_FD_H
21#define STREAM_FD_H 1
22
23#include <stdbool.h>
24#include <stddef.h>
25#include <stdint.h>
26
27struct stream;
28struct pstream;
e731d71b 29struct sockaddr_storage;
c34b65c7 30
b7636967 31int new_fd_stream(char *name, int fd, int connect_status,
b7cefbf7 32 int fd_type, struct stream **streamp);
b7636967 33int new_fd_pstream(char *name, int fd,
e731d71b
AS
34 int (*accept_cb)(int fd, const struct sockaddr_storage *ss,
35 size_t ss_len, struct stream **),
c34b65c7
BP
36 char *unlink_path,
37 struct pstream **pstreamp);
38
39#endif /* stream-fd.h */