BIND 10 #878: Code to bind to address/port
BIND 10 Development
do-not-reply at isc.org
Fri Aug 12 14:04:16 UTC 2011
#878: Code to bind to address/port
-------------------------------------+-------------------------------------
Reporter: shane | Owner: shane
Type: | Status: reviewing
enhancement | Milestone: Sprint-
Priority: major | DHCP-20110712
Component: dhcp | Resolution:
Keywords: | Sensitive: 0
Defect Severity: N/A | Sub-Project: DHCP
Feature Depending on Ticket: dhcp- | Estimated Difficulty: 3.0
echo | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by shane):
I know Pkt6 is just a bare skeleton, but...
* I think rather than changing ownership of the allocated packet, we
should use a smart pointer instead, or more properly the shared_array type
from Boost. It is designed for just this kind of access pattern, and means
we don't have to be as careful about memory.
http://www.boost.org/doc/libs/1_46_1/libs/smart_ptr/smart_ptr.htm
* If you really want to stick with the current allocation style, then I
think it is better to let the out of memory exception exit the
Pkt6::Pkt6(int datalen) constructor rather than catch it.
* While all member fields should be commented, the iface and ifindex
especially need to be explained (I know what they mean but they probably
won't be obvious to anyone who has not worked with interfaces directly).
--
Ticket URL: <http://bind10.isc.org/ticket/878#comment:13>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list