~ubuntu-branches/ubuntu/natty/open-iscsi/natty-proposed

« back to all changes in this revision

Viewing changes to include/fw_context.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-12-10 18:19:20 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20091210181920-qd2orbk01bhsoiau
Tags: 2.0.871-0ubuntu1
* New upstream release.
* If the root filesystem is on iSCSI, prevent the network interface used
  for it from being brought up or down automatically (LP: #457767).
* Backport from upstream:
  - Allow updating of discovery records (Hannes Reinecke).
  - Fix discovery record use, rather than always using iscsid.conf
    settings (Mike Christie).

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef FWPARAM_CONTEXT_H_
22
22
#define FWPARAM_CONTEXT_H_
23
23
 
 
24
#include <net/if.h>
 
25
 
 
26
#include "iscsi_proto.h"
 
27
#include "list.h"
 
28
#include "auth.h"
 
29
 
24
30
struct boot_context {
25
 
#define IQNSZ (223+1)
 
31
        struct list_head list;
 
32
 
 
33
        /* target settings */
26
34
        int target_port;
27
 
        char initiatorname[IQNSZ];
28
 
        char targetname[IQNSZ];
 
35
        char targetname[TARGET_NAME_MAXLEN + 1];
29
36
        char target_ipaddr[32];
30
 
        char chap_name[127];
31
 
        char chap_password[16];
32
 
        char chap_name_in[127];
33
 
        char chap_password_in[16];
34
 
        char iface[42];
 
37
        char chap_name[AUTH_STR_MAX_LEN];
 
38
        char chap_password[AUTH_STR_MAX_LEN];
 
39
        char chap_name_in[AUTH_STR_MAX_LEN];
 
40
        char chap_password_in[AUTH_STR_MAX_LEN];
 
41
 
 
42
        /* initiator settings */
 
43
        char isid[10];
 
44
        char initiatorname[TARGET_NAME_MAXLEN + 1];
 
45
 
 
46
        /* network settings */
 
47
        char dhcp[18];
 
48
        char iface[IF_NAMESIZE];
35
49
        char mac[18];
36
50
        char ipaddr[18];
 
51
        char gateway[18];
 
52
        char primary_dns[18];
 
53
        char secondary_dns[18];
37
54
        char mask[18];
38
55
        char lun[17];
39
56
        char vlan[15];
40
 
        char isid[10];
41
57
};
42
58
 
43
 
extern int fw_get_entry(struct boot_context *context, const char *filepath);
 
59
extern int fw_get_entry(struct boot_context *context);
44
60
extern void fw_print_entry(struct boot_context *context);
 
61
extern int fw_get_targets(struct list_head *list);
 
62
extern void fw_free_targets(struct list_head *list);
45
63
 
46
64
#endif /* FWPARAM_CONTEXT_H_ */