aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/hash_lookup.h
diff options
context:
space:
mode:
authorRuslan Babayev <ruslan@babayev.com>2020-02-14 17:45:02 -0800
committerRuslan Babayev <ruslan@babayev.com>2020-05-02 16:06:16 -0700
commite31820af10cfdea8baf941ee7df676db92d5b1bb (patch)
tree8a805e4f0c865b262709e93fca372f7f3b7822f5 /src/plugins/acl/hash_lookup.h
parent24b417c481bb2f33d80e8016f871df8ce62ab0bb (diff)
vlib: add nosyslog unix option
The "nosyslog" option disables syslog just like the "interactive" mode but can be used together with "nodaemon". This is useful for when VPP is running under a process supervisor like runit or daemontools that pipe the stdout/stderr to a dedicated logger service. Type: feature Change-Id: Ic4287338d6836fea9f3eabdcf960dc1f51875dd1 Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
Diffstat (limited to 'src/plugins/acl/hash_lookup.h')
0 files changed, 0 insertions, 0 deletions
Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef included_vlib_i2c_h
#define included_vlib_i2c_h

#include <vppinfra/types.h>


#define I2C_MSG_FLAG_WRITE  0
#define I2C_MSG_FLAG_READ   1

typedef struct
{
  u8 addr;
  u8 flags;
  u16 len;
  u8 *buffer;
} i2c_msg_t;

typedef struct i2c_bus_t
{
  void (*put_bits) (struct i2c_bus_t * b, int scl, int sda);
  void (*get_bits) (struct i2c_bus_t * b, int *scl, int *sda);

  int timeout;
  u32 clock;
  f64 hold_time;
  f64 rise_fall_time;

  /* Private data */
  uword private_data;

} i2c_bus_t;

void vlib_i2c_init (i2c_bus_t * bus);
void vlib_i2c_xfer (i2c_bus_t * bus, i2c_msg_t * msgs);
void vlib_i2c_read_eeprom (i2c_bus_t * bus, u8 i2c_addr, u16 start_addr,
			   u16 length, u8 * data);

static inline int
vlib_i2c_bus_timed_out (i2c_bus_t * bus)
{
  return bus->timeout;
}

#endif /* included_vlib_i2c_h */

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */