OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2006 Georgia Tech Research Corporation | 3 * Copyright (c) 2006 Georgia Tech Research Corporation |
4 * 2007 INRIA | 4 * 2007 INRIA |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 * \returns true if broadcast is allowed, false otherwise | 588 * \returns true if broadcast is allowed, false otherwise |
589 */ | 589 */ |
590 virtual bool GetAllowBroadcast () const = 0; | 590 virtual bool GetAllowBroadcast () const = 0; |
591 | 591 |
592 /** | 592 /** |
593 * \brief Enable/Disable receive packet information to socket. | 593 * \brief Enable/Disable receive packet information to socket. |
594 * | 594 * |
595 * For IP_PKTINFO/IP6_PKTINFO. This method is only usable for· | 595 * For IP_PKTINFO/IP6_PKTINFO. This method is only usable for· |
596 * Raw socket and Datagram Socket. Not supported for Stream socket. | 596 * Raw socket and Datagram Socket. Not supported for Stream socket. |
597 * | 597 * |
| 598 * Method doesn't make distinction between IPv4 and IPv6. If it is enabled, |
| 599 * it is enabled for all types of sockets that supports packet information |
| 600 * |
598 * \param flag Enable/Disable receive information | 601 * \param flag Enable/Disable receive information |
599 * \returns nothing | 602 * \returns nothing |
600 */ | 603 */ |
601 void SetRecvPktInfo (bool flag); | 604 void SetRecvPktInfo (bool flag); |
| 605 |
| 606 /** |
| 607 * \brief Get status indicating whether enable/disable packet information to s
ocket |
| 608 * |
| 609 * \returns True if packet information should be sent to socket |
| 610 */ |
| 611 bool IsRecvPktInfo () const; |
602 · | 612 · |
603 protected: | 613 protected: |
604 void NotifyConnectionSucceeded (void); | 614 void NotifyConnectionSucceeded (void); |
605 void NotifyConnectionFailed (void); | 615 void NotifyConnectionFailed (void); |
606 void NotifyNormalClose (void); | 616 void NotifyNormalClose (void); |
607 void NotifyErrorClose (void); | 617 void NotifyErrorClose (void); |
608 bool NotifyConnectionRequest (const Address &from); | 618 bool NotifyConnectionRequest (const Address &from); |
609 void NotifyNewConnectionCreated (Ptr<Socket> socket, const Address &from); | 619 void NotifyNewConnectionCreated (Ptr<Socket> socket, const Address &from); |
610 void NotifyDataSent (uint32_t size); | 620 void NotifyDataSent (uint32_t size); |
611 void NotifySend (uint32_t spaceAvailable); | 621 void NotifySend (uint32_t spaceAvailable); |
612 void NotifyDataRecv (void); | 622 void NotifyDataRecv (void); |
613 virtual void DoDispose (void); | 623 virtual void DoDispose (void); |
614 Ptr<NetDevice> m_boundnetdevice; | 624 Ptr<NetDevice> m_boundnetdevice; |
615 bool m_recvpktinfo; | 625 bool m_recvPktInfo; |
616 private: | 626 private: |
617 Callback<void, Ptr<Socket> > m_connectionSucceeded; | 627 Callback<void, Ptr<Socket> > m_connectionSucceeded; |
618 Callback<void, Ptr<Socket> > m_connectionFailed; | 628 Callback<void, Ptr<Socket> > m_connectionFailed; |
619 Callback<void, Ptr<Socket> > m_normalClose; | 629 Callback<void, Ptr<Socket> > m_normalClose; |
620 Callback<void, Ptr<Socket> > m_errorClose; | 630 Callback<void, Ptr<Socket> > m_errorClose; |
621 Callback<bool, Ptr<Socket>, const Address &> m_connectionRequest; | 631 Callback<bool, Ptr<Socket>, const Address &> m_connectionRequest; |
622 Callback<void, Ptr<Socket>, const Address&> m_newConnectionCreated; | 632 Callback<void, Ptr<Socket>, const Address&> m_newConnectionCreated; |
623 Callback<void, Ptr<Socket>, uint32_t> m_dataSent; | 633 Callback<void, Ptr<Socket>, uint32_t> m_dataSent; |
624 Callback<void, Ptr<Socket>, uint32_t > m_sendCb; | 634 Callback<void, Ptr<Socket>, uint32_t > m_sendCb; |
625 Callback<void, Ptr<Socket> > m_receivedData; | 635 Callback<void, Ptr<Socket> > m_receivedData; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 virtual void Serialize (TagBuffer i) const; | 699 virtual void Serialize (TagBuffer i) const; |
690 virtual void Deserialize (TagBuffer i); | 700 virtual void Deserialize (TagBuffer i); |
691 virtual void Print (std::ostream &os) const; | 701 virtual void Print (std::ostream &os) const; |
692 private: | 702 private: |
693 bool m_dontFragment; | 703 bool m_dontFragment; |
694 }; | 704 }; |
695 | 705 |
696 } // namespace ns3 | 706 } // namespace ns3 |
697 | 707 |
698 #endif /* NS3_SOCKET_H */ | 708 #endif /* NS3_SOCKET_H */ |
OLD | NEW |