* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* RIPng support by Vincent Jardin <vincent.jardin@6wind.com>
else if (strncmp(direct_str, "o", 1) == 0)
direct = RIPNG_OFFSET_LIST_OUT;
else {
- vty_out(vty, "Invalid direction: %s%s", direct_str,
- VTY_NEWLINE);
- return CMD_WARNING;
+ vty_out(vty, "Invalid direction: %s\n", direct_str);
+ return CMD_WARNING_CONFIG_FAILED;
}
/* Check metric. */
metric = atoi(metric_str);
if (metric < 0 || metric > 16) {
- vty_out(vty, "Invalid metric: %s%s", metric_str, VTY_NEWLINE);
- return CMD_WARNING;
+ vty_out(vty, "Invalid metric: %s\n", metric_str);
+ return CMD_WARNING_CONFIG_FAILED;
}
/* Get offset-list structure with interface name. */
else if (strncmp(direct_str, "o", 1) == 0)
direct = RIPNG_OFFSET_LIST_OUT;
else {
- vty_out(vty, "Invalid direction: %s%s", direct_str,
- VTY_NEWLINE);
- return CMD_WARNING;
+ vty_out(vty, "Invalid direction: %s\n", direct_str);
+ return CMD_WARNING_CONFIG_FAILED;
}
/* Check metric. */
metric = atoi(metric_str);
if (metric < 0 || metric > 16) {
- vty_out(vty, "Invalid metric: %s%s", metric_str, VTY_NEWLINE);
- return CMD_WARNING;
+ vty_out(vty, "Invalid metric: %s\n", metric_str);
+ return CMD_WARNING_CONFIG_FAILED;
}
/* Get offset-list structure with interface name. */
ripng_offset_list_free(offset);
}
} else {
- vty_out(vty, "Can't find offset-list%s", VTY_NEWLINE);
- return CMD_WARNING;
+ vty_out(vty, "Can't find offset-list\n");
+ return CMD_WARNING_CONFIG_FAILED;
}
return CMD_SUCCESS;
}
/* If metric is modifed return 1. */
int ripng_offset_list_apply_in(struct prefix_ipv6 *p, struct interface *ifp,
- u_char *metric)
+ uint8_t *metric)
{
struct ripng_offset_list *offset;
struct access_list *alist;
/* If metric is modifed return 1. */
int ripng_offset_list_apply_out(struct prefix_ipv6 *p, struct interface *ifp,
- u_char *metric)
+ uint8_t *metric)
{
struct ripng_offset_list *offset;
struct access_list *alist;
void ripng_offset_clean(void)
{
- list_delete(ripng_offset_list_master);
+ list_delete(&ripng_offset_list_master);
ripng_offset_list_master = list_new();
ripng_offset_list_master->cmp =
for (ALL_LIST_ELEMENTS(ripng_offset_list_master, node, nnode, offset)) {
if (!offset->ifname) {
if (offset->direct[RIPNG_OFFSET_LIST_IN].alist_name)
- vty_out(vty, " offset-list %s in %d%s",
+ vty_out(vty, " offset-list %s in %d\n",
offset->direct[RIPNG_OFFSET_LIST_IN]
.alist_name,
offset->direct[RIPNG_OFFSET_LIST_IN]
- .metric,
- VTY_NEWLINE);
+ .metric);
if (offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name)
- vty_out(vty, " offset-list %s out %d%s",
+ vty_out(vty, " offset-list %s out %d\n",
offset->direct[RIPNG_OFFSET_LIST_OUT]
.alist_name,
offset->direct[RIPNG_OFFSET_LIST_OUT]
- .metric,
- VTY_NEWLINE);
+ .metric);
} else {
if (offset->direct[RIPNG_OFFSET_LIST_IN].alist_name)
- vty_out(vty, " offset-list %s in %d %s%s",
+ vty_out(vty, " offset-list %s in %d %s\n",
offset->direct[RIPNG_OFFSET_LIST_IN]
.alist_name,
offset->direct[RIPNG_OFFSET_LIST_IN]
.metric,
- offset->ifname, VTY_NEWLINE);
+ offset->ifname);
if (offset->direct[RIPNG_OFFSET_LIST_OUT].alist_name)
- vty_out(vty, " offset-list %s out %d %s%s",
+ vty_out(vty, " offset-list %s out %d %s\n",
offset->direct[RIPNG_OFFSET_LIST_OUT]
.alist_name,
offset->direct[RIPNG_OFFSET_LIST_OUT]
.metric,
- offset->ifname, VTY_NEWLINE);
+ offset->ifname);
}
}