Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NetworkManager-l2tp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CeRiAl
NetworkManager-l2tp
Commits
c2c8bfd0
Commit
c2c8bfd0
authored
Jan 15, 2011
by
Alexey Torkhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding options to toggle nopcomp and noaccomp.
parent
ef63ca58
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
advanced-dialog.c
properties/advanced-dialog.c
+21
-0
nm-l2tp-dialog.glade
properties/nm-l2tp-dialog.glade
+30
-0
nm-l2tp-service.c
src/nm-l2tp-service.c
+10
-0
nm-l2tp-service.h
src/nm-l2tp-service.h
+2
-0
No files found.
properties/advanced-dialog.c
View file @
c2c8bfd0
...
...
@@ -66,6 +66,8 @@ static const char *advanced_keys[] = {
NM_L2TP_KEY_NOBSDCOMP
,
NM_L2TP_KEY_NODEFLATE
,
NM_L2TP_KEY_NO_VJ_COMP
,
NM_L2TP_KEY_NO_PCOMP
,
NM_L2TP_KEY_USE_ACCOMP
,
NM_L2TP_KEY_LCP_ECHO_FAILURE
,
NM_L2TP_KEY_LCP_ECHO_INTERVAL
,
NULL
...
...
@@ -462,6 +464,17 @@ advanced_dialog_new (GHashTable *hash)
if
(
value
&&
!
strcmp
(
value
,
"yes"
))
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
FALSE
);
widget
=
glade_xml_get_widget
(
xml
,
"ppp_usepcomp"
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
TRUE
);
value
=
g_hash_table_lookup
(
hash
,
NM_L2TP_KEY_NO_PCOMP
);
if
(
value
&&
!
strcmp
(
value
,
"yes"
))
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
FALSE
);
widget
=
glade_xml_get_widget
(
xml
,
"ppp_useaccomp"
);
value
=
g_hash_table_lookup
(
hash
,
NM_L2TP_KEY_USE_ACCOMP
);
if
(
value
&&
!
strcmp
(
value
,
"yes"
))
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
widget
),
TRUE
);
widget
=
glade_xml_get_widget
(
xml
,
"ppp_send_echo_packets"
);
value
=
g_hash_table_lookup
(
hash
,
NM_L2TP_KEY_LCP_ECHO_INTERVAL
);
if
(
value
&&
strlen
(
value
))
{
...
...
@@ -536,6 +549,14 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
if
(
!
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
)))
g_hash_table_insert
(
hash
,
g_strdup
(
NM_L2TP_KEY_NO_VJ_COMP
),
g_strdup
(
"yes"
));
widget
=
glade_xml_get_widget
(
xml
,
"ppp_usepcomp"
);
if
(
!
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
)))
g_hash_table_insert
(
hash
,
g_strdup
(
NM_L2TP_KEY_NO_PCOMP
),
g_strdup
(
"yes"
));
widget
=
glade_xml_get_widget
(
xml
,
"ppp_useaccomp"
);
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
)))
g_hash_table_insert
(
hash
,
g_strdup
(
NM_L2TP_KEY_USE_ACCOMP
),
g_strdup
(
"yes"
));
widget
=
glade_xml_get_widget
(
xml
,
"ppp_send_echo_packets"
);
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
)))
{
g_hash_table_insert
(
hash
,
g_strdup
(
NM_L2TP_KEY_LCP_ECHO_FAILURE
),
g_strdup_printf
(
"%d"
,
5
));
...
...
properties/nm-l2tp-dialog.glade
View file @
c2c8bfd0
...
...
@@ -491,6 +491,36 @@
<property
name=
"position"
>
3
</property>
</packing>
</child>
<child>
<widget
class=
"GtkCheckButton"
id=
"ppp_usepcomp"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"label"
translatable=
"yes"
>
Use protocol _field compression negotiation
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"response_id"
>
0
</property>
<property
name=
"draw_indicator"
>
True
</property>
</widget>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
4
</property>
</packing>
</child>
<child>
<widget
class=
"GtkCheckButton"
id=
"ppp_useaccomp"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"label"
translatable=
"yes"
>
Use _Address/Control compression
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"response_id"
>
0
</property>
<property
name=
"draw_indicator"
>
True
</property>
</widget>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
False
</property>
<property
name=
"position"
>
5
</property>
</packing>
</child>
</widget>
</child>
</widget>
...
...
src/nm-l2tp-service.c
View file @
c2c8bfd0
...
...
@@ -386,6 +386,8 @@ static ValidProperty valid_properties[] = {
{
NM_L2TP_KEY_NOBSDCOMP
,
G_TYPE_BOOLEAN
,
FALSE
},
{
NM_L2TP_KEY_NODEFLATE
,
G_TYPE_BOOLEAN
,
FALSE
},
{
NM_L2TP_KEY_NO_VJ_COMP
,
G_TYPE_BOOLEAN
,
FALSE
},
{
NM_L2TP_KEY_NO_PCOMP
,
G_TYPE_BOOLEAN
,
FALSE
},
{
NM_L2TP_KEY_USE_ACCOMP
,
G_TYPE_BOOLEAN
,
FALSE
},
{
NM_L2TP_KEY_LCP_ECHO_FAILURE
,
G_TYPE_UINT
,
FALSE
},
{
NM_L2TP_KEY_LCP_ECHO_INTERVAL
,
G_TYPE_UINT
,
FALSE
},
{
NULL
,
G_TYPE_NONE
,
FALSE
}
...
...
@@ -1026,6 +1028,14 @@ nm_l2tp_config_write (NML2tpPlugin *plugin,
if
(
value
&&
!
strcmp
(
value
,
"yes"
))
write_config_option
(
pppopt_fd
,
"novj
\n
"
);
value
=
nm_setting_vpn_get_data_item
(
s_vpn
,
NM_L2TP_KEY_NO_PCOMP
);
if
(
value
&&
!
strcmp
(
value
,
"yes"
))
write_config_option
(
pppopt_fd
,
"nopcomp
\n
"
);
value
=
nm_setting_vpn_get_data_item
(
s_vpn
,
NM_L2TP_KEY_USE_ACCOMP
);
if
(
!
(
value
&&
!
strcmp
(
value
,
"yes"
)))
write_config_option
(
pppopt_fd
,
"noaccomp
\n
"
);
value
=
nm_setting_vpn_get_data_item
(
s_vpn
,
NM_L2TP_KEY_LCP_ECHO_FAILURE
);
if
(
value
&&
strlen
(
value
))
{
long
int
tmp_int
;
...
...
src/nm-l2tp-service.h
View file @
c2c8bfd0
...
...
@@ -63,6 +63,8 @@
#define NM_L2TP_KEY_NOBSDCOMP "nobsdcomp"
#define NM_L2TP_KEY_NODEFLATE "nodeflate"
#define NM_L2TP_KEY_NO_VJ_COMP "no-vj-comp"
#define NM_L2TP_KEY_NO_PCOMP "nopcomp"
#define NM_L2TP_KEY_USE_ACCOMP "accomp"
#define NM_L2TP_KEY_LCP_ECHO_FAILURE "lcp-echo-failure"
#define NM_L2TP_KEY_LCP_ECHO_INTERVAL "lcp-echo-interval"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment