repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
baptistejub/sparsam | ext/ruby_hooks.c | #include "serializer.h"
#include "stdio.h"
#include <ruby.h>
VALUE Sparsam = Qnil;
VALUE static_zero_array;
VALUE SparsamNativeError = Qnil;
ID intern_for_DEFAULT_VALUES;
ID intern_for_assign_defaults;
ID intern_for_assign_from_arg;
static void deallocate(void *data) { serializer_free(data); }
static VALUE allocate... |
patka817/SwiftX | SwiftX/SwiftX.h | //
// SwiftX.h
// SwiftX
//
// Created by <NAME> on 2020-10-07.
// Copyright © 2020 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for SwiftX.
FOUNDATION_EXPORT double SwiftXVersionNumber;
//! Project version string for SwiftX.
FOUNDATION_EXPORT const unsigned char S... |
SergejJurecko/native-ui | native-ui-sys/libui/uitable.h | <gh_stars>1-10
// 20 june 2016
// kept in a separate file for now
typedef struct uiImage uiImage;
// TODO use const void * for const correctness
_UI_EXTERN uiImage *uiNewImage(double width, double height);
_UI_EXTERN void uiFreeImage(uiImage *i);
_UI_EXTERN void uiImageAppend(uiImage *i, void *pixels, int pixelWidth,... |
crustymonkey/ironbee | modules/ident_authbasic.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | engine/engine_private.h | <filename>engine/engine_private.h
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALY... |
crustymonkey/ironbee | util/string.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | engine/logger.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | util/hash.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | libs/libinjection/c/libinjection_html5.c | #include "libinjection_html5.h"
#include <string.h>
#include <assert.h>
#ifdef DEBUG
#include <stdio.h>
#define TRACE() printf("%s:%d\n", __FUNCTION__, __LINE__)
#else
#define TRACE()
#endif
#define CHAR_EOF -1
#define CHAR_BANG 33
#define CHAR_DOUBLE 34
#define CHAR_PERCENT 37
#define CHAR_SINGLE 39
#define CHAR_D... |
crustymonkey/ironbee | util/json_yajl_encode.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | modules/lua_common.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/lock.h | <gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this fil... |
crustymonkey/ironbee | modules/ee_oper.c | <filename>modules/ee_oper.c
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS lice... |
crustymonkey/ironbee | util/list.c | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | modules/libinjection.c | <filename>modules/libinjection.c
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS... |
crustymonkey/ironbee | modules/txdump.c | <gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this fil... |
crustymonkey/ironbee | util/field.c | <gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this fil... |
crustymonkey/ironbee | servers/nginx/ngx_ironbee_plugin.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | libs/libinjection/c/libinjection_html5.h | #ifndef LIBINJECTION_HTML5
#define LIBINJECTION_HTML5
#ifdef __cplusplus
extern "C" {
#endif
/* pull in size_t */
#include <strings.h>
enum html5_type {
DATA_TEXT
, TAG_NAME_OPEN
, TAG_NAME_CLOSE
, TAG_NAME_SELFCLOSE
, TAG_DATA
, TAG_CLOSE
, ATTR_NAME
, ATTR_VALUE
, TAG_COMMENT
... |
crustymonkey/ironbee | engine/state_notify.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/server.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | servers/nginx/ngx_ironbee.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | modules/lua.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | util/queue.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | libs/libinjection/c/libinjection_xss.c | #include "libinjection_xss.h"
#include "libinjection_html5.h"
#include <assert.h>
#include <stdio.h>
/*
* HEY THIS ISN'T DONE
* AND MISSING A KEY INGREDIENT!!
*
*/
typedef enum attribute {
TYPE_NONE
, TYPE_BLACK /* ban always */
, TYPE_ATTR_URL /* attribute value takes a URL-like object */
... |
crustymonkey/ironbee | example_modules/ibmod_set_c.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/bytestr.h | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | engine/core_private.h | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | engine/filter.c | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | modules/pcre.c | <filename>modules/pcre.c<gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* ... |
crustymonkey/ironbee | modules/log_pipe.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/engine.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/dso.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | servers/trafficserver/ts_module.c | <gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this fil... |
crustymonkey/ironbee | include/ironbee/string.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | modules/lua_private.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | engine/engine_manager.c | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | engine/var.c | <filename>engine/var.c<gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QU... |
crustymonkey/ironbee | engine/rule_logger_private.h | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | modules/init_collection.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | util/mpool.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | util/lock.c | <gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this fil... |
crustymonkey/ironbee | engine/config.c | <reponame>crustymonkey/ironbee<filename>engine/config.c
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyrig... |
crustymonkey/ironbee | servers/apache_httpd2/mod_range_filter.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/list.h | <reponame>crustymonkey/ironbee<gh_stars>1-10
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownershi... |
crustymonkey/ironbee | modules/rules.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/var.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | include/ironbee/hash.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | util/flags.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | modules/abort.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | engine/engine_manager_control_channel.c | <filename>engine/engine_manager_control_channel.c
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright own... |
crustymonkey/ironbee | experimental/modules/rxfilter.c | <reponame>crustymonkey/ironbee
/*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS l... |
crustymonkey/ironbee | engine/core_audit.c | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
crustymonkey/ironbee | engine/rule_engine_private.h | /*****************************************************************************
* Licensed to Qualys, Inc. (QUALYS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* QUALYS licenses this file to You under ... |
vijith-tv/rdkservices | Warehouse/Warehouse.h | /**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2019 RDK Management
*
* 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 th... |
vijith-tv/rdkservices | DeviceInfo/DeviceInfo.h | <gh_stars>0
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... |
vijith-tv/rdkservices | Messenger/Messenger.h | /*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* 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 cop... |
vijith-tv/rdkservices | DeviceIdentification/DeviceIdentification.h | /*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* 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 cop... |
rangercej/otpsetpin | src/utils.h | /*****************************************************************************
Copyright (c) 2015 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... |
rangercej/otpsetpin | src/otperror.h | /*****************************************************************************
Copyright (c) 2015 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... |
rangercej/otpsetpin | src/userinfo.h | /*****************************************************************************
Copyright (c) 2015 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... |
rangercej/otpsetpin | src/options.h | /*****************************************************************************
Copyright (c) 2015 <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... |
millken/ddd | dns.c | #include <stdio.h>
#include "dns.h"
#include "config.h"
#include "utils.h"
Configuration config;
void dns_send(char *trgt_ip, int trgt_p, char *dns_srv, int dns_p,
unsigned char *dns_record);
void dns_send1();
// Taken from http://www.binarytides.com/raw-udp-sockets-c-linux/
unsigned short csum(unsigned short *pt... |
millken/ddd | test/udpflood.c | /*
https://github.com/wndfly/udpflood windows版本
https://github.com/pisto/tcpflood/ raw+connect
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#define __FAVOR_BSD
#define _USE_BSD
#include <netinet/udp.h> // struct udp
#include <string.h>
#include <unistd.h>
#include <errno.h... |
millken/ddd | main.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
if(getuid() != 0) {
printf("You must be running as root!\n");
return 1;
}
parse_config();
start_worker();
return 0;
}
void usage(char *str);
void usage(char *str)
{
printf("%s\n config.ini\n", str);
exit(0);
}
|
millken/ddd | test/udpflooder.c | <reponame>millken/ddd
//http://www.noktec.be/archives/392
#include <stdio.h> // printf/fprintf
#include <stdlib.h>
#include <string.h>
#include <netinet/ip.h> // struct ip
#include <sys/socket.h> // socket()
#include <netinet/in.h> // struct sockadd
#define __FAVOR_BSD
#define _USE_BSD
#include <netinet/udp.h> // st... |
millken/ddd | 3rd/HttpClient/HttpClient.h | <filename>3rd/HttpClient/HttpClient.h<gh_stars>1-10
#ifndef _HttpClient_H
#define _HttpClient_H
#include <stdbool.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include "http_parser.h"
#define MAXLINE 4096
#define alloc_cpy(dest, src, len) \
dest = malloc(l... |
millken/ddd | 3rd/HttpClient/test.c | #include <stdio.h>
#include "HttpClient.h"
int main(int argc, char* args[]) {
struct HttpClient *ht = New_HttpClient();
char *body;
int i = 0;
for (i = 0; i < 10; ++i)
{
ht = New_HttpClient();
body = ht->get(ht, args[1]);
if (ht->getError(ht) != NULL && body != NULL) {
printf("%d\n", strlen(body));
}
... |
millken/ddd | test/tcpsynflood.c | //https://github.com/raphui/TCPSynFlood/blob/master/main.c
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#define PACKET_MAX_SIZE 4096
// 16 bits ==> 2 octets => unsigned short
unsigned short csum( char *buff , in... |
millken/ddd | config.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <fcntl.h>
#include "config.h"
extern struct Configuration *config;
void daemonize_init()
{
int i;
if(getppid()==1) // parent pid ==1, the init process
return; /* already a daemon */
i=fork();
if (i<0)
... |
millken/ddd | 3rd/HttpClient/HttpClient.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#include "HttpClient.h"
#include "http_parser.h"
#include "sds.h... |
millken/ddd | udp.c | <reponame>millken/ddd
#include <stdio.h>
#include <errno.h>
#include <string.h> //memset
#include <stdlib.h> //exit
#include "utils.h"
#include "udp.h"
#include "config.h"
Configuration config;
void udp_worker()
{
printf("start udp\n");
int i;
for (i=0; i < config.udp_threads; i++) {
//new_thread_p(udp_send, 0);... |
millken/ddd | worker.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include <pthread.h>
#include "config.h"
#include "worker.h"
#include "dns.h"
#include "udp.h"
#include "utils.h"
Configuration config;
int fork_process(void (*func)())
{
int ret = fork();
if(ret == 0) {
... |
millken/ddd | include/utils.h | #ifndef _UTILS_H
#define _UTILS_H
char *
str_replace ( const char *string, const char *substr, const char *replacement );
int random_int(int min, int max);
unsigned long
random_lip(void);
char *
random_cip (void);
char *
random_chars(char *dst, int start, int end);
#endif /// _UTILS_H
|
millken/ddd | test/process.c | #include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
void restart_process(char **args){
int childpid;
childpid = fork ();
if (childpid < 0) {
perror ("fork failed");
} else if (childpid == 0) {
printf ("new process %d", getpid... |
millken/ddd | include/worker.h | <reponame>millken/ddd<gh_stars>1-10
#ifndef _WORKER_H
#define _WORKER_H
void start_worker();
int fork_process(void (*func)());
int new_thread_p(void *func, void *i);
void dns_master();
void dns_worker();
#endif /// _WORKER_H
|
millken/ddd | include/dns.h |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <arpa/inet.h>
#include <unistd.h>
// Typedef the iphdr and udphdr from the netinet libs to prevent
// an infestation of "struct" in all the checksum and size calculations
typed... |
millken/ddd | include/udp.h | // see struct http://www.linuxbase.org/navigator/browse/type_single.php?cmd=list-by-id&Tid=37103
#include <sys/socket.h>
#include <netinet/ip.h>
#define __FAVOR_BSD
#define _USE_BSD
#include <netinet/udp.h> // struct udp
int
udp_send();
void udp_worker(); |
millken/ddd | test/socket.c | <filename>test/socket.c
//http://www.cnitblog.com/zouzheng/archive/2010/11/25/71711.html
//http://stackoverflow.com/questions/4181784/how-to-set-socket-timeout-in-c-when-making-multiple-connections
//http://www.binarytides.com/receive-full-data-with-recv-socket-function-in-c/
//https://github.com/noumia/cc_inflate/t... |
millken/ddd | utils.c | #include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
//#include <netinet/in.h>
#include <arpa/inet.h> //inet_ntoa report error, if no
#include <unistd.h>
#include <stdio.h>
#include "utils.h"
unsigned short
ip_sum (unsigned short *addr, int len)
{
register int nleft = len;
register unsigned short *w =... |
millken/ddd | include/config.h | #ifndef _CONFIG_H
#define _CONFIG_H
#define DDD_VERSION "v0.01"
#define BOOL unsigned char
#define TRUE 1
#define FALSE 0
static int handler(void* user, const char* section, const char* name,
const char* value);
void daemonize_init();
void parse_config();
int bool_value(char *value... |
millken/ddd | test/pepsi.c | <filename>test/pepsi.c
/*
* pepsi.c
* Random Source Host UDP flooder
*
* Author: <EMAIL>
*
* [12.25.1996]
*
* Greets To: Havok, nightmar, vira, Kage, ananda, tmw, Cheesebal, efudd,
* Capone, cph|ber, WebbeR, Shadowimg, robocod, napster, marl, eLLjAY, fLICK^
* Toasty, [shadow], [magnus] and silitek, oh and ... |
Gauri7/clock1 | cbits/hs_clock_darwin.c | #ifdef __MACH__
#include <time.h>
#include <mach/clock.h>
#include <mach/mach.h>
void hs_clock_darwin_gettime(clock_id_t clock, struct timespec *ts)
{
// OS X does not have clock_gettime, use clock_get_time
// see http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx
clock_serv_t cclock;
mach_timespec... |
bdmendes/feup-cal-parking | src/model/StreetMap/StreetMap.h | <reponame>bdmendes/feup-cal-parking
#ifndef FEUP_CAL_PARKING_STREETMAP_H
#define FEUP_CAL_PARKING_STREETMAP_H
#include "../Graph/Graph.hpp"
#include "MapPoint.h"
#include "graphviewer.h"
#include <fstream>
class StreetMap : public Graph<MapPoint> {
public:
StreetMap(unsigned int windowWidth, unsigned int windowH... |
bdmendes/feup-cal-parking | src/controller/connectivity.h | <reponame>bdmendes/feup-cal-parking<filename>src/controller/connectivity.h
#ifndef FEUP_CAL_PARKING_CONNECTIVITY_H
#define FEUP_CAL_PARKING_CONNECTIVITY_H
#include "../algorithms/search.hpp"
#include "../model/StreetMap/StreetMap.h"
bool isStronglyConnected(const StreetMap &map);
bool isConnected(StreetMap &map, cons... |
bdmendes/feup-cal-parking | src/ui/ui.h | <filename>src/ui/ui.h
#ifndef UI_H
#define UI_H
#include "../model/Graph/Graph.hpp"
#include "../model/StreetMap/StreetMap.h"
class UI {
public:
explicit UI(StreetMap& map);
virtual void show() = 0;
protected:
/**
* Command handler. Loops while string received is empty.
* @param lowCase - whe... |
bdmendes/feup-cal-parking | src/ui/menu/menu.h | #ifndef MENU_H
#define MENU_H
#include "../ui.h"
#include "../../model/Graph/Graph.hpp"
#include "../../model/StreetMap/StreetMap.h"
class Menu : public UI {
public:
explicit Menu(StreetMap& map);
void show() override;
private:
void calculateConnectivity(StreetMap &map, const std::vector<Node<MapPoint>*> ... |
bdmendes/feup-cal-parking | src/model/StreetMap/MapPoint.h | #ifndef FEUP_CAL_PARKING_MAPPOINT_H
#define FEUP_CAL_PARKING_MAPPOINT_H
typedef struct {
unsigned capacity;
unsigned freeSpots;
double fixedPrice;
double capacityTaxFactor;
} ParkFields;
class MapPoint {
public:
MapPoint(double x, double y, double latitude, double longitude, bool park = false, Par... |
bdmendes/feup-cal-parking | src/performance/performance.h |
#ifndef FEUP_CAL_PARKING_PERFORMANCE_H
#define FEUP_CAL_PARKING_PERFORMANCE_H
#include "../model/Graph/Graph.hpp"
#include "../model/StreetMap/StreetMap.h"
inline Graph<int> generateRandomGraph(unsigned size) {
Graph<int> graph{};
id_t nodeId = 1;
for (unsigned i = 0; i < size; ++i) {
graph.addNo... |
bdmendes/feup-cal-parking | src/controller/parkselector.h | <filename>src/controller/parkselector.h
#ifndef FEUP_CAL_PARKING_PARKSELECTOR_H
#define FEUP_CAL_PARKING_PARKSELECTOR_H
#include <vector>
#include "../model/StreetMap/MapPoint.h"
#include "../model/Graph/Graph.hpp"
std::vector<Node<MapPoint>*>
getPathAfterParkReplacement(Graph<MapPoint>& graph, const std::vector<Node... |
teejoe/qrcodeplus | core/src/main/cpp/denoise.h | <filename>core/src/main/cpp/denoise.h<gh_stars>1-10
#ifndef DENOISE_H
#define DENOISE_H
void medianBlur(unsigned char* src, int width, int height);
#endif |
teejoe/qrcodeplus | core/src/main/cpp/hybridbinarizer.h | <filename>core/src/main/cpp/hybridbinarizer.h
#ifndef HYBRID_BYNARIZER_H
#define HYBRID_BYNARIZER_H
int** calculateBlackPoints(unsigned char* luminances, int subWidth, int subHeight, int width, int height);
void calculateThresholdForBlock(unsigned char* luminances, int subWidth, int subHeight, int width, int height, ... |
teejoe/qrcodeplus | core/src/main/cpp/hybridbinarizer.c | <reponame>teejoe/qrcodeplus<filename>core/src/main/cpp/hybridbinarizer.c
#define BLOCK_SIZE_POWER 3
#define BLOCK_SIZE (1 << BLOCK_SIZE_POWER) // ...0100...00
#define BLOCK_SIZE_MASK (BLOCK_SIZE - 1) // ...0011...11
#define MINIMUM_DIMENSION (BLOCK_SIZE * 5)
#define MIN_DYNAMIC_RANGE 24
int** calculateBlackPoints(
... |
teejoe/qrcodeplus | core/src/main/cpp/qrcodeplus.c | <gh_stars>1-10
/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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 ... |
teejoe/qrcodeplus | core/src/main/cpp/globalhistogrambinarizer.h | #ifndef GLOBAL_HISTOGRAM_BINARIZER_H
#define GLOBAL_HISTOGRAM_BINARIZER_H
void globalHistogramThreshold(unsigned char* luminance, int width, int height, int* bitMatrix);
#endif |
teejoe/qrcodeplus | core/src/main/cpp/denoise.c | /********************
* author: teejoe
* 2017-12-05
*/
#define MASK_SIZE 3
#define HALF_MASK_SIZE (MASK_SIZE >> 1)
void quick_sort(unsigned char* data, int start, int end);
void medianBlur(unsigned char* src, int width, int height)
{
unsigned char* dst = malloc(sizeof(unsigned char) * width * height);
int m... |
teejoe/qrcodeplus | core/src/main/cpp/globalhistogrambinarizer.c | /********************
* author: teejoe
* 2017-12-04
*/
#include <stdlib.h>
#define LUMINANCE_BITS 5
#define LUMINANCE_SHIFT (8 - LUMINANCE_BITS)
#define LUMINANCE_BUCKETS (1 << LUMINANCE_BITS)
int estimateBlackPoint(int* buckets, int length)
{
// Find the tallest peak in the histogram.
int numBuckets = leng... |
avinash-palleti/libigb | e1000_osdep.h | <filename>e1000_osdep.h<gh_stars>0
/******************************************************************************
Copyright (c) 2001-2016, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditio... |
avinash-palleti/libigb | e1000_hw.h | /******************************************************************************
Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions ... |
avinash-palleti/libigb | igb.c | <filename>igb.c<gh_stars>0
/******************************************************************************
Copyright (c) 2001-2017, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.