From: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
To: ofono@ofono.org
Subject: Re: [PATCHv2 2/6] gatppp: Add IPv6 CP hooks
Date: Wed, 16 Nov 2011 14:39:32 +0200 [thread overview]
Message-ID: <4EC3AF04.7030804@intel.com> (raw)
In-Reply-To: <4EC1D415.3040204@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2478 bytes --]
Hello Denis,
On 11/15/2011 04:53 AM, Denis Kenzior wrote:
>> + case IPV6CP_PROTO:
>> + if (ppp->ipv6cp)
>> + pppcp_process_packet(ppp->ipv6cp, packet, len - offset);
>> + break;
>
> Are you sure you don't want to send a protocol reject here?
Sure, will make it so, thanks for the idea.
>> +
>> + if (ppp->ipv6cp)
>> + pppcp_signal_close(ppp->ipv6cp);
>
> This also looks fine, but please add a newline here
OK.
>> +gboolean g_at_ppp_set_ipv6cp_info(GAtPPP *ppp, gboolean is_server,
>> + const char *local, const char *peer);
>
> So for consistency sake I think we should introduce
> g_at_ppp_set_ipv6_server_info(GAtPPP *ppp, const char *remote_prefix);
>
> For the local prefix, I'm leaning towards creating a new set of v6 and
> dual-stack specific constructors:
>
> g_at_ppp_ipv6_new(const char *local_prefix);
> g_at_ppp_ipv6_server_new(const char *local_prefix);
> g_at_ppp_ipv4v6_new(const char *local_prefix);
> g_at_ppp_ipv4v6_server_new(const char *local_ip, const char *local_prefix);
>
> The key difference between constructors being whether to create ipcp,
> ipv6cp or both. We might need a _full version of the server
> constructors as well. I'm not entirely happy with this, so if you have
> better ideas, I'd love to hear them.
That looks OK to me. Regarding alternatives, one would be:
enum ofono_ppp_proto {
OFONO_PPP_PROTO_IP = 0x1,
OFONO_PPP_PROTO_IPV6 = 0x2,
OFONO_PPP_PROTO_IPV4V6 = 0x4,
};
struct _GAtPPP {
[...]
guint8 proto;
};
g_at_ppp_new(guint8 proto);
or/and
g_at_ppp_set_proto(GAtPPP *ppp, guint8 proto, ...);
The usage would be:
- IPv4 only:
g_at_ppp_new(OFONO_GPRS_PROTO_IP);
- IPv6 only:
g_at_ppp_new(OFONO_GPRS_PROTO_IPV6);
- IPv4v6, both optional, but at least one is mandatory:
g_at_ppp_new(OFONO_GPRS_PROTO_IPV4V6);
- IPv4v6, both mandatory:
g_at_ppp_new(OFONO_GPRS_PROTO_IPV4V6 |
OFONO_GPRS_PROTO_IP | OFONO_GPRS_PROTO_IPV6);
- IPv4v6, IPv4 mandatory:
g_at_ppp_new(OFONO_GPRS_PROTO_IPV4V6 | OFONO_GPRS_PROTO_IP);
and so on.
For g_at_ppp_set_proto(GAtPPP *ppp, guint8 proto, ...) there might be optional
parameters (one IPv4/IPv6 local address or both IPv4 and IPv6 local addresses),
depending on the need. And similarly for g_at_ppp_set_server_info().
Regards,
Oleg
--
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
next prev parent reply other threads:[~2011-11-16 12:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 12:46 [PATCHv2 0/6] gatchat IPv6 CP support Oleg Zhurakivskyy
2011-11-08 12:46 ` [PATCHv2 1/6] gatchat: Add IPv6 Control Protocol Oleg Zhurakivskyy
2011-11-07 18:26 ` Denis Kenzior
2011-11-14 9:03 ` Oleg Zhurakivskyy
2011-11-13 21:29 ` Denis Kenzior
2011-11-08 12:46 ` [PATCHv2 2/6] gatppp: Add IPv6 CP hooks Oleg Zhurakivskyy
2011-11-15 2:53 ` Denis Kenzior
2011-11-16 12:39 ` Oleg Zhurakivskyy [this message]
2011-11-15 13:59 ` Denis Kenzior
2011-11-17 8:05 ` Oleg Zhurakivskyy
2011-11-08 12:46 ` [PATCHv2 3/6] gsmdial: Add IPv6 CP option Oleg Zhurakivskyy
2011-11-08 12:46 ` [PATCHv2 4/6] test-server: Add IPv6 CP options Oleg Zhurakivskyy
2011-11-08 12:46 ` [PATCHv2 5/6] gatppp: Add IPv6 CP connect, disconnect callbacks Oleg Zhurakivskyy
2011-11-15 2:59 ` Denis Kenzior
2011-11-16 14:05 ` Oleg Zhurakivskyy
2011-11-15 13:43 ` Denis Kenzior
2011-11-17 8:10 ` Oleg Zhurakivskyy
2011-11-08 12:46 ` [PATCHv2 6/6] gsmdial: Add IPv6 CP connect hook Oleg Zhurakivskyy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC3AF04.7030804@intel.com \
--to=oleg.zhurakivskyy@intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.