type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | AP_ONLY
if (ap_cfg_running) {
#else
if (ap_cfg_running && !strncmp(dev->name, "wl0.1", 5)) {
#endif
WL_SOFTAP(("AP DOWN %d\n", event_type));
wl_iw_send_priv_event(priv_dev, "AP_DOWN");
} |
functions | AP_ONLY
if (ap_cfg_running) {
#else
if (ap_cfg_running && !strncmp(dev->name, "wl0.1", 5)) {
#endif
WL_SOFTAP(("AP UP %d\n", event_type));
wl_iw_send_priv_event(priv_dev, "AP_UP");
} |
functions | endif
if (cmd) {
if (cmd == SIOCGIWSCAN)
wireless_send_event(dev, cmd, &wrqu, NULL);
else
wireless_send_event(dev, cmd, &wrqu, extra);
} |
functions | int
wl_iw_get_wireless_stats(struct net_device *dev, struct iw_statistics *wstats)
{
int res = 0;
wl_cnt_t cnt;
int phy_noise;
int rssi;
scb_val_t scb_val;
phy_noise = 0;
if ((res = dev_wlc_ioctl(dev, WLC_GET_PHY_NOISE, &phy_noise, sizeof(phy_noise))))
goto done;
phy_noise = dtoh32(phy_noise);
WL_TRACE(("w... |
functions | void
wl_iw_bt_flag_set(
struct net_device *dev,
bool set)
{
#if defined(BT_DHCP_USE_FLAGS)
char buf_flag7_dhcp_on[8] = { 7, 00, 00, 00, 0x1, 0x0, 0x00, 0x00 } |
functions | void
wl_iw_bt_timerfunc(ulong data)
{
bt_info_t *bt_local = (bt_info_t *)data;
bt_local->timer_on = 0;
WL_TRACE(("%s\n", __FUNCTION__));
up(&bt_local->tsk_ctl.sema);
} |
functions | int
_bt_dhcp_sysioc_thread(void *data)
{
tsk_ctl_t *tsk_ctl = (tsk_ctl_t *)data;
DAEMONIZE("dhcp_sysioc");
complete(&tsk_ctl->completed);
while (down_interruptible(&tsk_ctl->sema) == 0) {
SMP_RD_BARRIER_DEPENDS();
if (tsk_ctl->terminated) {
break;
} |
functions | void
wl_iw_bt_release(void)
{
bt_info_t *bt_local = g_bt;
if (!bt_local) {
return;
} |
functions | int
wl_iw_bt_init(struct net_device *dev)
{
bt_info_t *bt_dhcp = NULL;
bt_dhcp = kmalloc(sizeof(bt_info_t), GFP_KERNEL);
if (!bt_dhcp)
return -ENOMEM;
memset(bt_dhcp, 0, sizeof(bt_info_t));
g_bt = bt_dhcp;
bt_dhcp->dev = dev;
bt_dhcp->bt_state = BT_DHCP_IDLE;
bt_dhcp->timer_ms = 10;
init_timer(&bt_d... |
functions | int
wl_iw_attach(struct net_device *dev, void * dhdp)
{
#if defined(WL_IW_USE_ISCAN)
int params_size = 0;
#endif
wl_iw_t *iw;
#if defined(WL_IW_USE_ISCAN)
iscan_info_t *iscan = NULL;
#endif
DHD_OS_MUTEX_INIT(&wl_cache_lock);
DHD_OS_MUTEX_INIT(&wl_softap_lock);
#if defined(WL_IW_USE_ISCAN)
if (!dev)
return 0;... |
functions | void
wl_iw_detach(void)
{
#if defined(WL_IW_USE_ISCAN)
iscan_buf_t *buf;
iscan_info_t *iscan = g_iscan;
if (!iscan)
return;
if (iscan->tsk_ctl.thr_pid >= 0) {
PROC_STOP(&iscan->tsk_ctl);
} |
functions | CONFIG_WPS2
if (g_wps_probe_req_ie) {
kfree(g_wps_probe_req_ie);
g_wps_probe_req_ie = NULL;
g_wps_probe_req_ie_len = 0;
} |
functions | SOFTAP
if (ap_cfg_running) {
WL_TRACE(("\n%s AP is going down\n", __FUNCTION__));
wl_iw_send_priv_event(priv_dev, "AP_DOWN");
} |
includes |
#include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <unistd.h> |
includes | #include <string.h> |
includes |
#include <sys/types.h> |
includes | #include <sys/socket.h> |
includes | #include <netinet/in.h> |
includes | #include <netdb.h> |
defines |
#define BUFSIZE 12 /* the estimated diff between funcptr/buf */ |
defines |
#define CMD "xterm &" /* command to execute if successful */ |
defines |
#define ERROR -1 |
main | int main(int argc, char **argv)
{
register int i;
u_long sysaddr;
static char buf[BUFSIZE + sizeof(u_long) + 1] = {0} |
includes |
#include <linux/nvme.h> |
includes | #include <linux/bitops.h> |
includes | #include <linux/lightnvm.h> |
defines |
#define NVME_NVM_CHNLS_PR_REQ ((4096U - sizeof(struct nvme_nvm_id)) \ |
structs | struct nvme_nvm_hb_rw {
__u8 opcode;
__u8 flags;
__u16 command_id;
__le32 nsid;
__u64 rsvd2;
__le64 metadata;
__le64 prp1;
__le64 prp2;
__le64 slba;
__le16 length;
__le16 control;
__le32 dsmgmt;
__le64 phys_addr;
}; |
structs | struct nvme_nvm_identify {
__u8 opcode;
__u8 flags;
__u16 command_id;
__le32 nsid;
__u64 rsvd[2];
__le64 prp1;
__le64 prp2;
__le32 chnl_off;
__u32 rsvd11[5];
}; |
structs | struct nvme_nvm_l2ptbl {
__u8 opcode;
__u8 flags;
__u16 command_id;
__le32 nsid;
__le32 cdw2[4];
__le64 prp1;
__le64 prp2;
__le64 slba;
__le32 nlb;
__le16 cdw14[6];
}; |
structs | struct nvme_nvm_bbtbl {
__u8 opcode;
__u8 flags;
__u16 command_id;
__le32 nsid;
__u64 rsvd[2];
__le64 prp1;
__le64 prp2;
__le32 prp1_len;
__le32 prp2_len;
__le32 lbb;
__u32 rsvd11[3];
}; |
structs | struct nvme_nvm_set_resp {
__u8 opcode;
__u8 flags;
__u16 command_id;
__le32 nsid;
__u64 rsvd[2];
__le64 prp1;
__le64 prp2;
__le64 resp;
__u32 rsvd11[4];
}; |
structs | struct nvme_nvm_erase_blk {
__u8 opcode;
__u8 flags;
__u16 command_id;
__le32 nsid;
__u64 rsvd[2];
__le64 prp1;
__le64 prp2;
__le64 blk_addr;
__u32 rsvd11[4];
}; |
structs | struct nvme_nvm_command {
union {
struct nvme_common_command common;
struct nvme_nvm_identify nvm_identify;
struct nvme_nvm_hb_rw nvm_hb_rw;
struct nvme_nvm_l2ptbl nvm_l2p;
struct nvme_nvm_bbtbl nvm_get_bb;
struct nvme_nvm_bbtbl nvm_set_bb;
struct nvme_nvm_set_resp nvm_resp;
struct nvme_nvm_erase_blk n... |
functions | void _nvme_nvm_check_size(void)
{
BUILD_BUG_ON(sizeof(struct nvme_nvm_identify) != 64);
BUILD_BUG_ON(sizeof(struct nvme_nvm_hb_rw) != 64);
BUILD_BUG_ON(sizeof(struct nvme_nvm_l2ptbl) != 64);
BUILD_BUG_ON(sizeof(struct nvme_nvm_bbtbl) != 64);
BUILD_BUG_ON(sizeof(struct nvme_nvm_set_resp) != 64);
BUILD_BUG_ON(sizeo... |
functions | int init_chnls(struct request_queue *q, struct nvm_id *nvm_id,
struct nvme_nvm_id *nvme_nvm_id)
{
struct nvme_nvm_id_chnl *src = nvme_nvm_id->chnls;
struct nvm_id_chnl *dst = nvm_id->chnls;
struct nvme_ns *ns = q->queuedata;
struct nvme_nvm_command c = {
.nvm_identify.opcode = nvme_nvm_admin_identify,
.nv... |
functions | int nvme_nvm_identify(struct request_queue *q, struct nvm_id *nvm_id)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_nvm_id *nvme_nvm_id;
struct nvme_nvm_command c = {
.nvm_identify.opcode = nvme_nvm_admin_identify,
.nvm_identify.nsid = cpu_to_le32(ns->ns_id),
.nvm_identify.chnl_off = 0,
} |
functions | int nvme_nvm_get_features(struct request_queue *q,
struct nvm_get_features *gf)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_nvm_command c = {
.common.opcode = nvme_nvm_admin_get_features,
.common.nsid = ns->ns_id,
} |
functions | int nvme_nvm_set_resp(struct request_queue *q, u64 resp)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_nvm_command c = {
.nvm_resp.opcode = nvme_nvm_admin_set_resp,
.nvm_resp.nsid = cpu_to_le32(ns->ns_id),
.nvm_resp.resp = cpu_to_le64(resp),
} |
functions | int nvme_nvm_get_l2p_tbl(struct request_queue *q, u64 slba, u64 nlb,
nvm_l2p_update_fn *update_l2p, void *priv)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_dev *dev = ns->dev;
struct nvme_nvm_command c = {
.nvm_l2p.opcode = nvme_nvm_admin_get_l2p_tbl,
.nvm_l2p.nsid = cpu_to_le32(ns->ns_id),
} |
functions | int nvme_nvm_set_bb_tbl(struct request_queue *q, int lunid,
unsigned int nr_blocks, nvm_bb_update_fn *update_bbtbl, void *priv)
{
return 0;
} |
functions | int nvme_nvm_get_bb_tbl(struct request_queue *q, int lunid,
unsigned int nr_blocks, nvm_bb_update_fn *update_bbtbl, void *priv)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_dev *dev = ns->dev;
struct nvme_nvm_command c = {
.nvm_get_bb.opcode = nvme_nvm_admin_get_bb_tbl,
.nvm_get_bb.nsid = cpu_to_le32(ns->ns... |
functions | void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd,
struct nvme_ns *ns, struct nvme_nvm_command *c)
{
c->nvm_hb_rw.opcode = (rq_data_dir(rq) ?
nvme_nvm_cmd_hb_write : nvme_nvm_cmd_hb_read);
c->nvm_hb_rw.nsid = cpu_to_le32(ns->ns_id);
c->nvm_hb_rw.slba = cpu_to_le64(nvme_block_nr(ns,
rqd->bio-... |
functions | void nvme_nvm_end_io(struct request *rq, int error)
{
struct nvm_rq *rqd = rq->end_io_data;
struct nvm_tgt_instance *ins = rqd->ins;
ins->tt->end_io(rq->end_io_data, error);
kfree(rq->cmd);
blk_mq_free_request(rq);
} |
functions | int nvme_nvm_submit_io(struct request_queue *q, struct nvm_rq *rqd)
{
struct nvme_ns *ns = q->queuedata;
struct request *rq;
struct bio *bio = rqd->bio;
struct nvme_nvm_command *cmd;
rq = blk_mq_alloc_request(q, bio_rw(bio), GFP_KERNEL, 0);
if (IS_ERR(rq))
return -ENOMEM;
cmd = kzalloc(sizeof(struct nvme_nvm... |
functions | int nvme_nvm_erase_block(struct request_queue *q, sector_t block_id)
{
struct nvme_ns *ns = q->queuedata;
struct nvme_nvm_command c = {
.nvm_erase.opcode = nvme_nvm_cmd_erase,
.nvm_erase.nsid = cpu_to_le32(ns->ns_id),
.nvm_erase.blk_addr = cpu_to_le64(block_id),
} |
functions | int nvme_nvm_register(struct request_queue *q, char *disk_name)
{
return nvm_register(q, disk_name, &nvme_nvm_dev_ops);
} |
functions | void nvme_nvm_unregister(char *disk_name)
{
nvm_unregister(disk_name);
} |
functions | int nvme_nvm_register(struct request_queue *q, char *disk_name)
{
return 0;
} |
functions | void nvme_nvm_unregister(char *disk_name) {} |
defines | #define CASE_CODE(E) case E: return #E |
functions | void DeStateStoreFree(DeStateStore *store) {
SCEnter();
if (store == NULL) {
SCReturn;
} |
functions | void DetectEngineStateFree(DetectEngineState *state) {
DeStateStore *iter = NULL;
DeStateStore *aux = NULL;
if (state == NULL)
return;
iter = state->head;
while (iter != NULL) {
aux = iter;
iter = iter->next;
SCFree(aux);
} |
functions | void DetectEngineStateReset(DetectEngineState *state) {
SCEnter();
DeStateStore *iter = NULL;
DeStateStore *aux = NULL;
if (state == NULL)
return;
iter = state->head;
while (iter != NULL) {
aux = iter;
iter = iter->next;
SCFree(aux);
} |
functions | int DeStateUpdateInspectTransactionId(Flow *f, char direction) {
SCEnter();
int r = 0;
SCMutexLock(&f->m);
r = AppLayerTransactionUpdateInspectId(f, direction);
SCMutexUnlock(&f->m);
SCReturnInt(r);
} |
functions | void DeStateSignatureAppend(DetectEngineState *state, Signature *s,
SigMatch *sm, char uri, char dce, char hcbd,
char hhd, char hrhd, char hmd, char hcd) {
DeStateStore *store = state->tail;
if (store == NULL) {
store = DeStateStoreA... |
functions | int DeStateFlowHasState(Flow *f) {
SCEnter();
int r = 0;
SCMutexLock(&f->de_state_m);
if (f->de_state == NULL || f->de_state->cnt == 0)
r = 0;
else
r = 1;
SCMutexUnlock(&f->de_state_m);
SCReturnInt(r);
} |
functions | int DeStateDetectStartDetection(ThreadVars *tv, DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx, Signature *s, Flow *f, uint8_t flags,
void *alstate, uint16_t alproto)
{
SCEnter();
SigMatch *sm = s->sm_lists[DETECT_SM_LIST_AMATCH];
int match = 0;
int r = 0;
char umatch = 0;
... |
functions | else if (alproto == ALPROTO_DCERPC || alproto == ALPROTO_SMB || alproto == ALPROTO_SMB2) {
if (s->sm_lists[DETECT_SM_LIST_DMATCH] != NULL) {
dinspect = 1;
SCLogDebug("inspecting dce payload");
if (alproto == ALPROTO_SMB || alproto == ALPROTO_SMB2) {
SMBState... |
functions | else if (sm->next == NULL) {
sm = NULL; /* set to NULL as we have a match */
if (!appinspect || (appinspect == appmatch)) {
r = 1;
} |
functions | int DeStateDetectContinueDetection(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *alstate, uint16_t alproto)
{
SCEnter();
SigIntId cnt = 0;
SigIntId store_cnt = 0;
DeStateStore *store = NULL;
int match = 0;
char umatch = 0;
char... |
functions | else if (alproto == ALPROTO_DCERPC || alproto == ALPROTO_SMB || alproto == ALPROTO_SMB2) {
if (s->sm_lists[DETECT_SM_LIST_DMATCH] != NULL) {
if (!(item->flags & DE_STATE_FLAG_DCE_MATCH)) {
SCLogDebug("inspecting dce payload");
dinspect ... |
functions | else if (sm->next == NULL) {
/* mark the sig as matched */
item->nm = NULL;
if (!appinspect || (appinspect == appmatch)) {
det_ctx->de_state_sig_array[item->sid] = DE_STATE_MATCH_NEW;
SCLogDe... |
functions | else if (uinspect && !umatch) {
det_ctx->de_state_sig_array[item->sid] = DE_STATE_MATCH_PARTIAL;
SCLogDebug("state set to %s", DeStateMatchResultToString(DE_STATE_MATCH_PARTIAL));
} |
functions | int DeStateRestartDetection(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
Flow *f, uint8_t flags, void *alstate, uint16_t alproto)
{
SCEnter();
/* first clear the existing state as it belongs
* to the previous transaction */
SCMutexLock(&f->de_state_m);
if (f->de... |
functions | int DeStateDetectSignature(ThreadVars *tv, DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx, Signature *s, Packet *p, uint8_t flags,
void *alstate, uint16_t alproto)
{
SCEnter();
int r = 0;
if (p->flow == NULL) {
SCReturnInt(0);
} |
functions | int DeStateTest01(void) {
SCLogDebug("sizeof(DetectEngineState)\t\t%"PRIuMAX,
(uintmax_t)sizeof(DetectEngineState));
SCLogDebug("sizeof(DeStateStore)\t\t\t%"PRIuMAX,
(uintmax_t)sizeof(DeStateStore));
SCLogDebug("sizeof(DeStateStoreItem)\t\t%"PRIuMAX"",
(uintmax_t)sizeof(D... |
functions | int DeStateTest02(void) {
int result = 0;
DetectEngineState *state = DetectEngineStateAlloc();
if (state == NULL) {
printf("d == NULL: ");
goto end;
} |
functions | int DeStateTest03(void) {
int result = 0;
DetectEngineState *state = DetectEngineStateAlloc();
if (state == NULL) {
printf("d == NULL: ");
goto end;
} |
functions | int DeStateSigTest01(void) {
int result = 0;
Signature *s = NULL;
DetectEngineThreadCtx *det_ctx = NULL;
ThreadVars th_v;
Flow f;
TcpSession ssn;
Packet *p = NULL;
uint8_t httpbuf1[] = "POST / HTTP/1.0\r\n";
uint8_t httpbuf2[] = "User-Agent: Mozilla/1.0\r\n";
uint8_t httpbuf3[] =... |
functions | int DeStateSigTest02(void) {
int result = 0;
Signature *s = NULL;
DetectEngineThreadCtx *det_ctx = NULL;
ThreadVars th_v;
Flow f;
TcpSession ssn;
Packet *p = NULL;
uint8_t httpbuf1[] = "POST / HTTP/1.1\r\n";
uint8_t httpbuf2[] = "User-Agent: Mozilla/1.0\r\nContent-Length: 10\r\n";
... |
functions | void DeStateRegisterTests(void) {
#ifdef UNITTESTS
UtRegisterTest("DeStateTest01", DeStateTest01, 1);
UtRegisterTest("DeStateTest02", DeStateTest02, 1);
UtRegisterTest("DeStateTest03", DeStateTest03, 1);
UtRegisterTest("DeStateSigTest01", DeStateSigTest01, 1);
UtRegisterTest("DeStateSigTest02", DeSt... |
includes |
#include <linux/slab.h> |
includes | #include <linux/module.h> |
includes | #include <linux/kernel.h> |
includes |
#include <pcmcia/cs_types.h> |
includes | #include <pcmcia/ss.h> |
includes | #include <pcmcia/cs.h> |
includes | #include <pcmcia/cistpl.h> |
functions | int static_init(struct pcmcia_socket *s)
{
/* the good thing about SS_CAP_STATIC_MAP sockets is
* that they don't need a resource database */
s->resource_setup_done = 1;
return 0;
} |
functions | int static_find_io(struct pcmcia_socket *s, unsigned int attr,
unsigned int *base, unsigned int num,
unsigned int align)
{
if (!s->io_offset)
return -EINVAL;
*base = s->io_offset | (*base & 0x0fff);
return 0;
} |
functions | gboolean
pulse_timer (GtkProgressBar *progress)
{
g_assert (GTK_IS_PROGRESS_BAR (progress));
if (gtk_progress_bar_get_pulse_step (progress) != 0) {
gtk_progress_bar_pulse (progress);
return TRUE;
} |
functions | void
start_pulse (GtkProgressBar *progress)
{
guint stag;
gtk_progress_bar_set_pulse_step (progress, 0.05);
gtk_progress_bar_pulse (progress);
stag = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (progress), "pulse-timer"));
if (stag == 0) {
/* Start a pulse timer */
... |
functions | void
stop_pulse (GtkProgressBar *progress)
{
gtk_progress_bar_set_pulse_step (progress, 0.0);
/* This causes the destroy callback to be called */
g_object_set_data (G_OBJECT (progress), "pulse-timer", NULL);
} |
functions | void
operation_progress (BastileOperation *operation, const gchar *message,
gdouble fract, BastileWidget *swidget)
{
GtkProgressBar *progress;
GtkStatusbar *status;
guint id;
progress = GTK_PROGRESS_BAR (bastile_widget_get_widget (swidget, "progress"));
status = GTK_STATUS... |
functions | void
operation_done (BastileOperation *operation, BastileWidget *swidget)
{
GError *err = NULL;
if (!bastile_operation_is_successful (operation)) {
bastile_operation_copy_error (operation, &err);
if (err) {
operation_progress (operation, err->message, 0.0, swidget);
g_er... |
functions | void
disconnect_progress (BastileWidget *widget, BastileOperation *op)
{
g_signal_handlers_disconnect_by_func (op, operation_progress, widget);
g_signal_handlers_disconnect_by_func (op, operation_done, widget);
} |
functions | void
bastile_progress_status_set_operation (BastileWidget *swidget,
BastileOperation *operation)
{
BastileOperation *prev;
/*
* Note that this is not one off, the operation is monitored until it is
* replaced, so if the operation starts up again the pro... |
functions | void
progress_operation_update (BastileOperation *operation, const gchar *message,
gdouble fract, BastileWidget *swidget)
{
GtkProgressBar *progress;
GtkWidget *w;
const gchar *t;
w = GTK_WIDGET (bastile_widget_get_widget (swidget, "operation-details"));
g_return_if_... |
functions | void
on_progress_operation_cancel (GtkButton *button, BastileOperation *operation)
{
if (bastile_operation_is_running (operation))
bastile_operation_cancel (operation);
} |
functions | void
progress_operation_done (BastileOperation *operation, BastileWidget *swidget)
{
bastile_widget_destroy (swidget);
} |
functions | int
progress_delete_event (GtkWidget *widget, GdkEvent *event,
BastileOperation *operation)
{
/* When window close we simulate a cancel */
on_progress_operation_cancel (NULL, operation);
/* Allow window to close regardless of outcome */
return TRUE;
} |
functions | void
progress_destroy (BastileWidget *swidget, BastileOperation *operation)
{
/*
* Since we allow the window to close (user forces it) even when the
* operation is not complete, we have to take care to cleanup these
* signal handlers.
*/
g_signal_handlers_disconnect_by_func (... |
functions | gboolean
progress_show (BastileOperation *operation)
{
BastileWidget *swidget;
GtkWidget *w;
const gchar *title;
gchar *t;
if (!bastile_operation_is_running (operation)) {
/* Matches the ref in bastile_progress_show */
g_object_unref (operation);
return FALSE;
} |
functions | void
bastile_progress_show (BastileOperation *operation, const gchar *title,
gboolean delayed)
{
/* Unref in the timeout callback */
g_object_ref (operation);
g_object_set_data_full (G_OBJECT (operation), "progress-title",
title ? g_strdup (title) : NULL, (GDest... |
includes | #include <lcm_drv.h> |
defines |
#define LCM_COMPILE_ASSERT(condition) LCM_COMPILE_ASSERT_X(condition, __LINE__) |
defines | #define LCM_COMPILE_ASSERT_X(condition, line) LCM_COMPILE_ASSERT_XX(condition, line) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.