Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ea3d2fd1
Commit
ea3d2fd1
authored
Nov 29, 2011
by
Marek Lindner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
batman-adv: export used routing algorithm via sysfs
Signed-off-by:
Marek Lindner
<
lindner_marek@yahoo.de
>
parent
d419be1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
Documentation/ABI/testing/sysfs-class-net-mesh
Documentation/ABI/testing/sysfs-class-net-mesh
+7
-0
net/batman-adv/bat_sysfs.c
net/batman-adv/bat_sysfs.c
+9
-0
No files found.
Documentation/ABI/testing/sysfs-class-net-mesh
View file @
ea3d2fd1
...
@@ -65,6 +65,13 @@ Description:
...
@@ -65,6 +65,13 @@ Description:
Defines the penalty which will be applied to an
Defines the penalty which will be applied to an
originator message's tq-field on every hop.
originator message's tq-field on every hop.
What: /sys/class/net/<mesh_iface>/mesh/routing_algo
Date: Dec 2011
Contact: Marek Lindner <lindner_marek@yahoo.de>
Description:
Defines the routing procotol this mesh instance
uses to find the optimal paths through the mesh.
What: /sys/class/net/<mesh_iface>/mesh/vis_mode
What: /sys/class/net/<mesh_iface>/mesh/vis_mode
Date: May 2010
Date: May 2010
Contact: Marek Lindner <lindner_marek@yahoo.de>
Contact: Marek Lindner <lindner_marek@yahoo.de>
...
...
net/batman-adv/bat_sysfs.c
View file @
ea3d2fd1
...
@@ -272,6 +272,13 @@ static ssize_t store_vis_mode(struct kobject *kobj, struct attribute *attr,
...
@@ -272,6 +272,13 @@ static ssize_t store_vis_mode(struct kobject *kobj, struct attribute *attr,
return
count
;
return
count
;
}
}
static
ssize_t
show_bat_algo
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
char
*
buff
)
{
struct
bat_priv
*
bat_priv
=
kobj_to_batpriv
(
kobj
);
return
sprintf
(
buff
,
"%s
\n
"
,
bat_priv
->
bat_algo_ops
->
name
);
}
static
void
post_gw_deselect
(
struct
net_device
*
net_dev
)
static
void
post_gw_deselect
(
struct
net_device
*
net_dev
)
{
{
struct
bat_priv
*
bat_priv
=
netdev_priv
(
net_dev
);
struct
bat_priv
*
bat_priv
=
netdev_priv
(
net_dev
);
...
@@ -382,6 +389,7 @@ BAT_ATTR_BOOL(bonding, S_IRUGO | S_IWUSR, NULL);
...
@@ -382,6 +389,7 @@ BAT_ATTR_BOOL(bonding, S_IRUGO | S_IWUSR, NULL);
BAT_ATTR_BOOL
(
fragmentation
,
S_IRUGO
|
S_IWUSR
,
update_min_mtu
);
BAT_ATTR_BOOL
(
fragmentation
,
S_IRUGO
|
S_IWUSR
,
update_min_mtu
);
BAT_ATTR_BOOL
(
ap_isolation
,
S_IRUGO
|
S_IWUSR
,
NULL
);
BAT_ATTR_BOOL
(
ap_isolation
,
S_IRUGO
|
S_IWUSR
,
NULL
);
static
BAT_ATTR
(
vis_mode
,
S_IRUGO
|
S_IWUSR
,
show_vis_mode
,
store_vis_mode
);
static
BAT_ATTR
(
vis_mode
,
S_IRUGO
|
S_IWUSR
,
show_vis_mode
,
store_vis_mode
);
static
BAT_ATTR
(
routing_algo
,
S_IRUGO
,
show_bat_algo
,
NULL
);
static
BAT_ATTR
(
gw_mode
,
S_IRUGO
|
S_IWUSR
,
show_gw_mode
,
store_gw_mode
);
static
BAT_ATTR
(
gw_mode
,
S_IRUGO
|
S_IWUSR
,
show_gw_mode
,
store_gw_mode
);
BAT_ATTR_UINT
(
orig_interval
,
S_IRUGO
|
S_IWUSR
,
2
*
JITTER
,
INT_MAX
,
NULL
);
BAT_ATTR_UINT
(
orig_interval
,
S_IRUGO
|
S_IWUSR
,
2
*
JITTER
,
INT_MAX
,
NULL
);
BAT_ATTR_UINT
(
hop_penalty
,
S_IRUGO
|
S_IWUSR
,
0
,
TQ_MAX_VALUE
,
NULL
);
BAT_ATTR_UINT
(
hop_penalty
,
S_IRUGO
|
S_IWUSR
,
0
,
TQ_MAX_VALUE
,
NULL
);
...
@@ -399,6 +407,7 @@ static struct bat_attribute *mesh_attrs[] = {
...
@@ -399,6 +407,7 @@ static struct bat_attribute *mesh_attrs[] = {
&
bat_attr_fragmentation
,
&
bat_attr_fragmentation
,
&
bat_attr_ap_isolation
,
&
bat_attr_ap_isolation
,
&
bat_attr_vis_mode
,
&
bat_attr_vis_mode
,
&
bat_attr_routing_algo
,
&
bat_attr_gw_mode
,
&
bat_attr_gw_mode
,
&
bat_attr_orig_interval
,
&
bat_attr_orig_interval
,
&
bat_attr_hop_penalty
,
&
bat_attr_hop_penalty
,
...
...
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