equal
deleted
inserted
replaced
69 * - Accept: not allowed |
69 * - Accept: not allowed |
70 */ |
70 */ |
71 class PacketSocket : public Socket |
71 class PacketSocket : public Socket |
72 { |
72 { |
73 public: |
73 public: |
74 PacketSocket (Ptr<Node> node); |
74 PacketSocket (); |
75 virtual ~PacketSocket (); |
75 virtual ~PacketSocket (); |
|
76 |
|
77 void SetNode (Ptr<Node> node); |
76 |
78 |
77 virtual enum SocketErrno GetErrno (void) const; |
79 virtual enum SocketErrno GetErrno (void) const; |
78 virtual Ptr<Node> GetNode (void) const; |
80 virtual Ptr<Node> GetNode (void) const; |
79 virtual int Bind (void); |
81 virtual int Bind (void); |
80 virtual int Bind (const Address & address); |
82 virtual int Bind (const Address & address); |
85 virtual int Send (Ptr<Packet> p); |
87 virtual int Send (Ptr<Packet> p); |
86 virtual int SendTo(const Address &address,Ptr<Packet> p); |
88 virtual int SendTo(const Address &address,Ptr<Packet> p); |
87 |
89 |
88 |
90 |
89 private: |
91 private: |
90 |
|
91 private: |
|
92 void Init (void); |
|
93 void ForwardUp (Ptr<NetDevice> device, Ptr<Packet> packet, |
92 void ForwardUp (Ptr<NetDevice> device, Ptr<Packet> packet, |
94 uint16_t protocol, const Address &from); |
93 uint16_t protocol, const Address &from); |
95 int DoBind (const PacketSocketAddress &address); |
94 int DoBind (const PacketSocketAddress &address); |
96 virtual void DoDispose (void); |
95 virtual void DoDispose (void); |
97 |
96 |