sockatmark.c (1c0046d792b8e3aaeb463bd82d23f1439d377371) sockatmark.c (ffdd70376ad2f72a20581512ebbbe4f88204d99f)
1/*
2 * Copyright (c) 2002 William C. Fenner. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
25 * $FreeBSD$
26 */
27#include "namespace.h"
28#include <sys/ioctl.h>
1/*
2 * Copyright (c) 2002 William C. Fenner. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
25 * $FreeBSD$
26 */
27#include "namespace.h"
28#include <sys/ioctl.h>
29#include <sys/socket.h>
29#include "un-namespace.h"
30
31int sockatmark(int s)
32{
33 int atmark;
34
35 if (_ioctl(s, SIOCATMARK, &atmark) == -1)
36 return -1;
37 return atmark;
38}
30#include "un-namespace.h"
31
32int sockatmark(int s)
33{
34 int atmark;
35
36 if (_ioctl(s, SIOCATMARK, &atmark) == -1)
37 return -1;
38 return atmark;
39}