aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/socket.c55
1 files changed, 14 insertions, 41 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 45832fb75ea4..ac7f2aacc77b 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * net/tipc/socket.c: TIPC socket API 2 * net/tipc/socket.c: TIPC socket API
3 * 3 *
4 * Copyright (c) 2001-2006, Ericsson AB 4 * Copyright (c) 2001-2007, Ericsson AB
5 * Copyright (c) 2004-2006, Wind River Systems 5 * Copyright (c) 2004-2007, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -1600,33 +1600,6 @@ static int getsockopt(struct socket *sock,
1600} 1600}
1601 1601
1602/** 1602/**
1603 * Placeholders for non-implemented functionality
1604 *
1605 * Returns error code (POSIX-compliant where defined)
1606 */
1607
1608static int ioctl(struct socket *s, u32 cmd, unsigned long arg)
1609{
1610 return -EINVAL;
1611}
1612
1613static int no_mmap(struct file *file, struct socket *sock,
1614 struct vm_area_struct *vma)
1615{
1616 return -EINVAL;
1617}
1618static ssize_t no_sendpage(struct socket *sock, struct page *page,
1619 int offset, size_t size, int flags)
1620{
1621 return -EINVAL;
1622}
1623
1624static int no_skpair(struct socket *s1, struct socket *s2)
1625{
1626 return -EOPNOTSUPP;
1627}
1628
1629/**
1630 * Protocol switches for the various types of TIPC sockets 1603 * Protocol switches for the various types of TIPC sockets
1631 */ 1604 */
1632 1605
@@ -1636,19 +1609,19 @@ static struct proto_ops msg_ops = {
1636 .release = release, 1609 .release = release,
1637 .bind = bind, 1610 .bind = bind,
1638 .connect = connect, 1611 .connect = connect,
1639 .socketpair = no_skpair, 1612 .socketpair = sock_no_socketpair,
1640 .accept = accept, 1613 .accept = accept,
1641 .getname = get_name, 1614 .getname = get_name,
1642 .poll = poll, 1615 .poll = poll,
1643 .ioctl = ioctl, 1616 .ioctl = sock_no_ioctl,
1644 .listen = listen, 1617 .listen = listen,
1645 .shutdown = shutdown, 1618 .shutdown = shutdown,
1646 .setsockopt = setsockopt, 1619 .setsockopt = setsockopt,
1647 .getsockopt = getsockopt, 1620 .getsockopt = getsockopt,
1648 .sendmsg = send_msg, 1621 .sendmsg = send_msg,
1649 .recvmsg = recv_msg, 1622 .recvmsg = recv_msg,
1650 .mmap = no_mmap, 1623 .mmap = sock_no_mmap,
1651 .sendpage = no_sendpage 1624 .sendpage = sock_no_sendpage
1652}; 1625};
1653 1626
1654static struct proto_ops packet_ops = { 1627static struct proto_ops packet_ops = {
@@ -1657,19 +1630,19 @@ static struct proto_ops packet_ops = {
1657 .release = release, 1630 .release = release,
1658 .bind = bind, 1631 .bind = bind,
1659 .connect = connect, 1632 .connect = connect,
1660 .socketpair = no_skpair, 1633 .socketpair = sock_no_socketpair,
1661 .accept = accept, 1634 .accept = accept,
1662 .getname = get_name, 1635 .getname = get_name,
1663 .poll = poll, 1636 .poll = poll,
1664 .ioctl = ioctl, 1637 .ioctl = sock_no_ioctl,
1665 .listen = listen, 1638 .listen = listen,
1666 .shutdown = shutdown, 1639 .shutdown = shutdown,
1667 .setsockopt = setsockopt, 1640 .setsockopt = setsockopt,
1668 .getsockopt = getsockopt, 1641 .getsockopt = getsockopt,
1669 .sendmsg = send_packet, 1642 .sendmsg = send_packet,
1670 .recvmsg = recv_msg, 1643 .recvmsg = recv_msg,
1671 .mmap = no_mmap, 1644 .mmap = sock_no_mmap,
1672 .sendpage = no_sendpage 1645 .sendpage = sock_no_sendpage
1673}; 1646};
1674 1647
1675static struct proto_ops stream_ops = { 1648static struct proto_ops stream_ops = {
@@ -1678,19 +1651,19 @@ static struct proto_ops stream_ops = {
1678 .release = release, 1651 .release = release,
1679 .bind = bind, 1652 .bind = bind,
1680 .connect = connect, 1653 .connect = connect,
1681 .socketpair = no_skpair, 1654 .socketpair = sock_no_socketpair,
1682 .accept = accept, 1655 .accept = accept,
1683 .getname = get_name, 1656 .getname = get_name,
1684 .poll = poll, 1657 .poll = poll,
1685 .ioctl = ioctl, 1658 .ioctl = sock_no_ioctl,
1686 .listen = listen, 1659 .listen = listen,
1687 .shutdown = shutdown, 1660 .shutdown = shutdown,
1688 .setsockopt = setsockopt, 1661 .setsockopt = setsockopt,
1689 .getsockopt = getsockopt, 1662 .getsockopt = getsockopt,
1690 .sendmsg = send_stream, 1663 .sendmsg = send_stream,
1691 .recvmsg = recv_stream, 1664 .recvmsg = recv_stream,
1692 .mmap = no_mmap, 1665 .mmap = sock_no_mmap,
1693 .sendpage = no_sendpage 1666 .sendpage = sock_no_sendpage
1694}; 1667};
1695 1668
1696static struct net_proto_family tipc_family_ops = { 1669static struct net_proto_family tipc_family_ops = {